import sys sys.setrecursionlimit(5*10**5) input = sys.stdin.readline from collections import defaultdict, deque, Counter from heapq import heappop, heappush from bisect import bisect_left, bisect_right from math import gcd n,m = map(int,input().split()) s = 7*60+30 t = s + 60 x = n*60+m+0.5 if x < s: print('Yes') elif s<= x <= t: print('Late') else: print('No')