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

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

if abc.count(5) == 2 and abc.count(7) == 1: print("YES")

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

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

-print(("YES" if abc.count(5) == 2 and abc.count(7) == 1 else "NO")) +if abc.count(5) == 2 and abc.count(7) == 1: +    print("YES") +else: +    print("NO")