a,b,c=list(map(int,input().split()));print((['NO','YES'][max(a,b,c)==7 and (a+b+c)-max(a,b,c)==10]))
a=input().replace('5','');print(('NYOE S'[a.count('7')==1::2]))
a, b, c = list(map(int, input().split()))
print((["NO", "YES"][max(a, b, c) == 7 and (a + b + c) - max(a, b, c) == 10]))

a = input().replace("5", "")
print(("NYOE S"[a.count("7") == 1 :: 2]))

-a, b, c = list(map(int, input().split())) -print((["NO", "YES"][max(a, b, c) == 7 and (a + b + c) - max(a, b, c) == 10])) +a = input().replace("5", "") +print(("NYOE S"[a.count("7") == 1 :: 2]))