a ,b, c = list(map(int,input().split()))

if a*b*c == 175:

  print("YES")

else:

  print("NO")
ABC=[int(x) for x in input().split()]

ABC.sort()

print(('YES' if ABC == [5,5,7] else 'NO'))

a, b, c = list(map(int, input().split()))
if a * b * c == 175:
    print("YES")
else:
    print("NO")

ABC = [int(x) for x in input().split()]
ABC.sort()
print(("YES" if ABC == [5, 5, 7] else "NO"))

-a, b, c = list(map(int, input().split())) -if a * b * c == 175: -    print("YES") -else: -    print("NO") +ABC = [int(x) for x in input().split()] +ABC.sort() +print(("YES" if ABC == [5, 5, 7] else "NO"))