h,m = map(int,input().split()) t = 60*h+m; s = 450; g = 510 if t<s: print("Yes") elif t<g: print("Late") else: print("No")