H,M = map(int,input().split()) s = 7*60*60 + 30*60 e = 8*60*60 + 30*60 t = H*60*60 + M*60 + 30 if t <= s: print("Yes") if s <= t <= e: print("Late") if e <= t: print("No")