X = int(eval(input()))

if X == 7 or X == 5 or X == 3:

    print('YES')

else:

    print('NO')
X = int(eval(input()))



if X in (3, 5, 7):

    print('YES')

    

else:

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

X = int(eval(input()))
if X in (3, 5, 7):
    print("YES")
else:
    print("NO")

-if X == 7 or X == 5 or X == 3: +if X in (3, 5, 7):