y,m,d=map(int,input().split()) if y<1989 or 20194: print("No") exit() print("Yes")