import java.util.Scanner;
public class year {
public static void main(String[] args) {
System.out.println("请输入年份");
Scanner sc = new Scanner(System.in);
int s = sc.nextInt();
System.out.println("请输入月份");
Scanner sc1 = new Scanner(System.in);
int v = sc.nextInt();
if (s%4==0&&s%100!=0||s%400==0){
System.out.println(s+"是闰年");
}else {
System.out.println(s+"是平年");
}
if (v ==1||v==3||v ==5||v==7||v ==8||v==10||v ==12){
System.out.println(v+"是31天");
}
else if(v==4||v ==6||v==9||v ==11){
System.out.println(v+"是30天");
}else if(s%4==0&&s%100!=0&&v==2||s%400==0&&v==2){
System.out.println(v+"是29天");
}else{
System.out.println(v+"是28天");
}
}
}