x = int(eval(input()))

if x in (7,5,3):

    print('YES')

else:

    print('NO')

n = int(eval(input()))

if n in (7, 5, 3):

    print('YES')

else:

    print('NO')

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

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

-x = int(eval(input())) -if x in (7, 5, 3): +n = int(eval(input())) +if n in (7, 5, 3):