x = int (eval(input ()))

if x==3 or x==5 or x==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 == 3 or x == 5 or x == 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 == 3 or x == 5 or x == 7: +X = int(eval(input())) +if X == 7 or X == 5 or X == 3: