H, W = map(int, input().split()) t = H * 60 + W if t < 450: print("Yes") elif t < 510: print("Late") else: print("No")