H,M=map(int,input().split()) woke=3600*H+60*M+30 start=3600*7+60*30 end=3600*8+60*30 if woke<=start:print("Yes") elif start<=woke<=end:print("Late") else:print("No")