a = sorted(list(map(int,input().split())))

if a[0]==5 and a[1]==5 and a[2]==7:

	print("YES")

else:

	print("NO")
arr = [int(x) for x in input().split()]

arr1 = [0,0,0,0,0,0,0,0,0,0,0]

arr1[arr[0]]+=1

arr1[arr[1]]+=1

arr1[arr[2]]+=1

if(arr1[5]==2 and arr1[7]==1):

    print("YES")

else:

    print("NO")
a = sorted(list(map(int, input().split())))
if a[0] == 5 and a[1] == 5 and a[2] == 7:
    print("YES")
else:
    print("NO")

arr = [int(x) for x in input().split()]
arr1 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
arr1[arr[0]] += 1
arr1[arr[1]] += 1
arr1[arr[2]] += 1
if arr1[5] == 2 and arr1[7] == 1:
    print("YES")
else:
    print("NO")

-a = sorted(list(map(int, input().split()))) -if a[0] == 5 and a[1] == 5 and a[2] == 7: +arr = [int(x) for x in input().split()] +arr1 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] +arr1[arr[0]] += 1 +arr1[arr[1]] += 1 +arr1[arr[2]] += 1 +if arr1[5] == 2 and arr1[7] == 1: