x = int(eval(input()))

if x == 3 or x == 5 or x ==7:

    print("YES")

else:

    print("NO")
x=int(eval(input()))

l=[3,5,7]

print(("YES" if x in l else "NO"))
x = int(eval(input()))
if x == 3 or x == 5 or x == 7:
    print("YES")
else:
    print("NO")

x = int(eval(input()))
l = [3, 5, 7]
print(("YES" if x in l else "NO"))

-if x == 3 or x == 5 or x == 7: -    print("YES") -else: -    print("NO") +l = [3, 5, 7] +print(("YES" if x in l else "NO"))