*s,=map(int,input().split()) print('NYoe s'[[1989,1,7]