l = list(map(int, input().split())) d = l[0]*10000+l[1]*100+l[2] print("Yes" if 19890107