x = int(eval(input()))



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

    print("YES")

else:

    print("NO")

x = int(eval(input()))



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

    ans = 'YES'

else:

    ans = 'NO'

print(ans)

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

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

-if x == 5 or x == 3 or x == 7: -    print("YES") +if x == 3 or x == 5 or x == 7: +    ans = "YES" -    print("NO") +    ans = "NO" +print(ans)