H,M=map(int,input().split()) if H<7: print("Yes") elif H==7 and M<30: print("Yes") elif H==7: print("Late") elif H<=8 and M<30: print("Late") else: print("No")