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

print((["NO","YES"][a==b==5 and c==7]))
a,b,c=sorted(input().split())

print((["NO","YES"][a==b=="5" and c=="7"]))
a, b, c = sorted(map(int, input().split()))
print((["NO", "YES"][a == b == 5 and c == 7]))

a, b, c = sorted(input().split())
print((["NO", "YES"][a == b == "5" and c == "7"]))

-a, b, c = sorted(map(int, input().split())) -print((["NO", "YES"][a == b == 5 and c == 7])) +a, b, c = sorted(input().split()) +print((["NO", "YES"][a == b == "5" and c == "7"]))