S = int(input()) X = [int(a) for a in str(S)] if S[0] == 4 or S[0] == 5: print('Yes') else: Print('No')