h, m = list(map(int, input().split())) num = h*60 + m if num <= 449: print("Yes") elif 450 <= num <= 509: print("Late") else: print("No")