S = input() num = ['0', '1', '4', '5', '6', '9'] if S[5] in num: print("YES") else: print("NO")