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

if a==5 and b==5 and c==7:

  print('YES')

elif a==5 and b==7 and c==5:

  print('YES')

elif a==7 and b==5 and c==5:

  print('YES')

else:

  print('NO')
myList = list(map(int, input().split()))

if myList.count(5)==2 and myList.count(7)==1:

  print('YES')

else:

  print('NO')
a, b, c = list(map(int, input().split()))
if a == 5 and b == 5 and c == 7:
    print("YES")
elif a == 5 and b == 7 and c == 5:
    print("YES")
elif a == 7 and b == 5 and c == 5:
    print("YES")
else:
    print("NO")

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

-a, b, c = list(map(int, input().split())) -if a == 5 and b == 5 and c == 7: -    print("YES") -elif a == 5 and b == 7 and c == 5: -    print("YES") -elif a == 7 and b == 5 and c == 5: +myList = list(map(int, input().split())) +if myList.count(5) == 2 and myList.count(7) == 1: