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



if a+b+c ==17:

  print('YES')

else:

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

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

a, b, c = list(map(int, input().split()))
print(("YES" if (a + b + c) == 17 else "NO"))

-if a + b + c == 17: -    print("YES") -else: -    print("NO") +print(("YES" if (a + b + c) == 17 else "NO"))