import java.util.*;
public class MonYear {
public static void main(String[] strings) {
Scanner sc = new Scanner(System.in);
int MonthDays = 0;
String NameofMonth = "xxx";
System.out.println("Enter Month number");
int month = sc.nextInt();
System.out.println("Enter Year");
int year = sc.nextInt();
switch (month) {
case 1:
NameofMonth = "January";
MonthDays = 31;
break;
case 2:
NameofMonth = "Feburary";
if ((year % 400 == 0) || ((year % 4 == 0) && (year % 100 != 0))) {
MonthDays = 29;
} else {
MonthDays = 28;
}
break;
case 3:
NameofMonth = "March";
MonthDays = 31;
break;
case 4:
NameofMonth = "April";
MonthDays = 30;
break;
case 5:
NameofMonth = "May";
MonthDays = 31;
break;
case 6:
NameofMonth = "June";
MonthDays = 30;
break;
case 7:
NameofMonth = "July";
MonthDays = 31;
break;
case 8:
NameofMonth = "August";
MonthDays = 31;
break;
case 9:
NameofMonth = "September";
MonthDays = 30;
break;
case 10:
NameofMonth = "October";
MonthDays = 31;
break;
case 11:
NameofMonth = "November";
MonthDays = 30;
break;
case 12:
NameofMonth = "December";
MonthDays = 31;
break;
}
System.out.println(NameofMonth + " " + year + " has " + MonthDays + " days\n");
}
}