ABC=input().split()

if ABC.count("5")==2 and ABC.count("7")==1:

  print("YES")

else:

  print("NO")

ABC=list(map(int,input().split()))

if ABC.count(5)==2 and ABC.count(7)==1:

  print("YES")

else:

  print("NO")

ABC = input().split()
if ABC.count("5") == 2 and ABC.count("7") == 1:
    print("YES")
else:
    print("NO")

ABC = list(map(int, input().split()))
if ABC.count(5) == 2 and ABC.count(7) == 1:
    print("YES")
else:
    print("NO")

-ABC = input().split() -if ABC.count("5") == 2 and ABC.count("7") == 1: +ABC = list(map(int, input().split())) +if ABC.count(5) == 2 and ABC.count(7) == 1: