y,m,d=map(int,input().split()) if y<2019: print('Yes') if y>2019: print('No') if y==2019: if m<5: print('Yes') else: print('No')