21 lines
455 B
Python
21 lines
455 B
Python
# -*- coding:utf-8 -*-
|
|
# @Author len
|
|
# @Create 2023/12/14 20:30
|
|
|
|
month = int(input()) # 月
|
|
day = int(input()) # 日
|
|
days_in_month = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
|
|
|
|
# 2021年的2月只有28天
|
|
if month == 2 and day == 29:
|
|
print('no')
|
|
|
|
# 检查月份是否合法
|
|
if 1 <= month <= 12:
|
|
# 检查日期是否合法
|
|
if 1 <= day <= days_in_month[month - 1]:
|
|
print("yes")
|
|
else:
|
|
print('no')
|
|
else:
|
|
print('no') |