date = input()
month, day = date.split(' ')
if month == 'OCT' and day == '31':
print('yup')
elif month == 'DEC' and day == '25':
else:
print('nope')