a = int(eval(input()))

print(("YES" if a == 3 or a == 5 or a == 7 else "NO"))
a = int(eval(input()))

print(("YES" if a == 3 or a == 5 or a == 7 else "NO")) # if a in (3, 5, 7) else
a = int(eval(input()))
print(("YES" if a == 3 or a == 5 or a == 7 else "NO"))

a = int(eval(input()))
print(("YES" if a == 3 or a == 5 or a == 7 else "NO"))  # if a in (3, 5, 7) else

-print(("YES" if a == 3 or a == 5 or a == 7 else "NO")) +print(("YES" if a == 3 or a == 5 or a == 7 else "NO"))  # if a in (3, 5, 7) else