print((" YNEOS"[eval(input()) in "357"::2]))
if eval(input()) in "357":

  print("YES")

else:

  print("NO")
print((" YNEOS"[eval(input()) in "357" :: 2]))

if eval(input()) in "357":
    print("YES")
else:
    print("NO")

-print((" YNEOS"[eval(input()) in "357" :: 2])) +if eval(input()) in "357": +    print("YES") +else: +    print("NO")