#include<iostream>
using namespace std;
int main()
{
int year,mouth;
cin>>year>>mouth;
if((year%4==0&&year%100!=0)||year%400==0)
{
if(mouth==1||mouth==3||mouth==5||mouth==7||mouth==8||mouth==10||mouth==12)
{
cout<<"本月31天";
}
else if(mouth==2)
{
cout<<"本月29天";
}
else
{
cout<<"本月30天";
}
}
else
{
if(mouth==1||mouth==3||mouth==5||mouth==7||mouth==8||mouth==10||mouth==12)
{
cout<<"本月31天";
}
else if(mouth==2)
{
cout<<"本月28天";
}
else
{
cout<<"本月30天";
}
}
}
using namespace std;
int main()
{
int year,mouth;
cin>>year>>mouth;
if((year%4==0&&year%100!=0)||year%400==0)
{
if(mouth==1||mouth==3||mouth==5||mouth==7||mouth==8||mouth==10||mouth==12)
{
cout<<"本月31天";
}
else if(mouth==2)
{
cout<<"本月29天";
}
else
{
cout<<"本月30天";
}
}
else
{
if(mouth==1||mouth==3||mouth==5||mouth==7||mouth==8||mouth==10||mouth==12)
{
cout<<"本月31天";
}
else if(mouth==2)
{
cout<<"本月28天";
}
else
{
cout<<"本月30天";
}
}
}