def main(): a = input() b = list(str(a)) c = int(b[0]) if c == 4 or c == 5: print("Yes") else: print("No") if __name__ == '__main__': main()