import ;
public class Test1 {
public static void main(String[] args) {
new Test1().run();
}
public void run() {
("请输入年,月 空格隔开");
Scanner scanner = new Scanner();
// 获取用户输入的年月
int y = ();
int m = ();
// 判断是否为闰年
if ((y % 4 == 0 && y % 100 != 0) || y % 400 == 0) {
if (m < 8) {
if (m % 2 != 0) {
("31天");
} else if (m != 2) {
("30天");
} else {
("29天");
}
} else {
if (m % 2 == 0) {
("31天");
} else {
("30天");
}
}
} else {
if (m < 8) {
if (m % 2 != 0) {
("31天");
} else if (m != 2) {
("30天");
} else {
("28天");
}
} else {
if (m % 2 == 0) {
("31天");
} else {
("30天");
}
}
}
}
}