Y,M,D=map(int,input().split()) if Y<1989 or 2019=5 : print('No') else : print('Yes')