A = sorted([int(i) for i in input().split()])

print(('YES' if A == [5, 5, 7] else 'NO'))
A = sorted(input().split())

print(('YES' if A == ['5', '5', '7'] else 'NO'))
A = sorted([int(i) for i in input().split()])
print(("YES" if A == [5, 5, 7] else "NO"))

A = sorted(input().split())
print(("YES" if A == ["5", "5", "7"] else "NO"))

-A = sorted([int(i) for i in input().split()]) -print(("YES" if A == [5, 5, 7] else "NO")) +A = sorted(input().split()) +print(("YES" if A == ["5", "5", "7"] else "NO"))