a,b=map(int,input().split()) if a<7 or a==7 and b<30: print("Yes") elif a==7 and b>=30 or a==8 and b<=29: print("Late") else: print("No")