X=int(eval(input()))

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

    print('YES')

else:

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

if N==3 or N==5 or N==7:

  print('YES')

else:

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

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

-X = int(eval(input())) -if X == 7 or X == 5 or X == 3: +N = int(eval(input())) +if N == 3 or N == 5 or N == 7: