h, m = map(int, input().split()) if h <= 7 and m < 30: print('Yes') elif (h >= 7 and m >= 30) or (h <= 8 and m < 30): print('Late') else: print('No')