ans=["YES","NO"][eval(input()) not in "357"]

print(ans)
print((["NO","YES"][eval(input()) in "357"]))
ans = ["YES", "NO"][eval(input()) not in "357"]
print(ans)

print((["NO", "YES"][eval(input()) in "357"]))

-ans = ["YES", "NO"][eval(input()) not in "357"] -print(ans) +print((["NO", "YES"][eval(input()) in "357"]))