#include
#include
int main()
{
void daysinmonth(int y,int m);
int y,m;
scanf("%d %d",&y,&m);
daysinmonth(y,m);
system("PAUSE");
return EXIT_SUCCESS;
}
int isleapyear(int y)
{
return ((0==y%4 && 0!=y%100) || 0==y%400);
}
void daysinmonth(int y,int m)
{
int days;
switch(m)
{
case 1:
case 3:
case 5:
case 7:
case 8:
case 10:
case 12:
days=31;
break;
case 2:
days=28;
if(isleapyear(y))
{
days++;
}
break;
case 4:
case 6:
case 9:
case 11:
days=30;
break;
}
printf("%d年%d月有%d天\n",y,m,days);
}