X = eval(input())

if X in "753":

    print("YES")

else:

    print("NO")
X = eval(input())

print(("YES" if X in "753" else "NO"))
X = eval(input())
if X in "753":
    print("YES")
else:
    print("NO")

X = eval(input())
print(("YES" if X in "753" else "NO"))

-if X in "753": -    print("YES") -else: -    print("NO") +print(("YES" if X in "753" else "NO"))