peterverebics/CodeNet_Python_118 huggingface dataset:
def main():
    x = sorted(list(map(int, input().split())))
    print('YES' if x == [5, 5, 7] else 'NO')

if __name__ == '__main__':
    main()
a,b,c=map(int,input().split())
if a==b==5 and c==7 :
    print('YES')
elif   a==c==5 and b== 7:
    print('YES')
elif   b==c==5 and a==7:
    print('YES')
else:
    print('NO')
a,b,c=map(int,input().split())
print("YES" if a+b+c==17 and a*b*c==175 else "NO")
array = list(map(int, (input().split())))

if array.count(5) == 2 and array.count(7) == 1:
    print("YES")
else:
    print("NO")
a, b, c=map(int,input().split())
if a==7 and b==5 and c==5:
  print("YES")
elif a==5 and b==7 and c==5:
  print("YES")
elif a==5 and b==5 and c==7:
  print("YES")
else:
  print("NO")
a = input().split()
if a.count('5') == 2 and a.count('7'):
  print('YES')
else:
  print('NO')
A, B, C = map(int, input().split())

if A + B + C == 17 and max(A, B, C) == 7 and min(A, B, C) == 5:
    print('YES')
else:
    print('NO')
A, B, C = map(int, input().split())
fsf = [A, B, C]
if (fsf.count(5) == 2) & (fsf.count(7) == 1):
    print("YES")
else:
    print("NO")
def main():
    A, B, C = map(int, input().split())
    if (A == 5 and B == 7 and C == 5) or (A == 7 and B == 5 and C == 5) or (A == 5 and B == 5 and C ==7):
        print('YES')
    else:
        print('NO')
main()
a, b, c = map(int, input().split())
iroha = [a, b, c]
if iroha.count(5) == 2 and iroha.count(7) == 1:
  print("YES")
else:
  print("NO")
a=''.join(sorted(map(str,input().split())))
print('YES' if a=='557' else 'NO')
a,b,c=map(int,input().split())
List=[a,b,c]
if List.count(5)==2 and List.count(7)==1:
    print("YES")
else:
    print("NO")
a=input().split()
if a.count('5') == 2:
    if a.count('7')==1:
        print('YES')
else:
    print('NO')
a,b,c = map(int, input().split())
ans = "NO"
if a+b+c == 17 and a*b*c == 175:
  ans = "YES"
print(ans)
num = list(map(int, input().split()))

ans = sorted(num)
if(ans[0]==5 and ans[1]==5 and ans[2] == 7):
    print("YES")
else:
    print("NO")
# -*- coding: utf-8 -*-
# 整数の入力
lst = list(map(int, input().split()))

if lst[0] == 5:
    if (lst[1] == 7 and lst[2] == 5) or (lst[1] == 5 and lst[2] == 7):
        print("YES")
        exit()

elif lst[0] == 7:
    if lst[1] == 5 and lst[2] == 5:
        print("YES")
        exit()

print("NO")
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    ABC = list(map(int, input().split()))
    ABC.sort()
    print('YES' if [5, 5, 7] == ABC else 'NO')


if __name__ == "__main__":
    main()
a,b,c=map(int,input().split())
if (a==7 and b==5 and c==5) or (a==5 and b==7 and c==5) or (a==5 and b==5 and c==7):
  print("YES")
else:
  print("NO")
from sys import stdin
l = stdin.readline().rstrip().split()

cnt5 = cnt7 = 0

for ln in range(3):
	if l[ln] == '5' : cnt5 += 1
	if l[ln] == '7' : cnt7 += 1

if cnt5 == 2 and cnt7 == 1 : print('YES')
else : print('NO')
import sys
readline = sys.stdin.buffer.readline
a,b,c = map(int,readline().split())

if a == 5 and (b==5 or c==5):
    if b==7 or c==7:
        print("YES")
    else:
        print("NO")
elif a == 7 and (b==5 and c==5):
    print("YES")
else:
    print("NO")
s = list(map(int,input().split()))
s.sort()
if s==[5,5,7]:
    print("YES")
else:
    print("NO")
# A
l = list(map(int, input().split()))

if l.count(5) == 2 and l.count(7) == 1:
    print('YES')
else:
    print('NO')
# 入力
input_list = list(map(int, input().split()))

# 出力
if sorted(input_list) == [5,5,7]:
    print('YES')
else:
    print('NO')
nums = list(map(int, input().split()))
print("YES" if nums.count(5) == 2 and nums.count(7) == 1 else "NO")
x = input().split()
five = 0
seven = 0
for i in x:
  if i == '5':
    five += 1
  if i == '7':
    seven += 1
if five == 2 and seven == 1:
  print('YES')
else:
  print('NO')
abc = list(map(int, input().split()))
if abc.count(5) == 2 and abc.count(7) == 1:
  print("YES")
else:
  print("NO")
print('YES' if [5, 5, 7] == sorted(list(map(int, input().split()))) else 'NO')
a,b,c = map(int, input().split())

if sorted((a,b,c)) == [5,5,7]:
    print('YES')
else:
    print('NO')
a = input().split()
if a.count("5") == 2 and a.count("7") == 1:
    print("YES")
else:
    print("NO")
a,b,c = map(int, input().split())
total = a + b + c
if total == 17: 
    print("YES")
else: 
    print("NO")
A, B, C = map(int, input().split())
L = [A, B, C]
ans = [[5, 5, 7], [5, 7, 5], [7, 5, 5]]

if L in ans:
  print("YES")
else:
  print("NO")
n = list(map(int, input().split()))
if n.count(5) == 2 and n.count(7) == 1:
  print('YES')
else:
  print('NO')
a = input().strip()
lst=[]
for i in a:
    if i != " ":
        lst.append(i)
lst.sort()
if lst == ['5','5','7']:
    print("YES")
else:
    print("NO")
def resolve():
    a, b, c = map(int, input().split())
    if [a, b, c].count(7) == 1 and [a, b, c].count(5) == 2:
        print("YES")
    else:
        print("NO")
    return


if __name__ == "__main__":
    resolve()
from collections import Counter
L=Counter(list(map(int,input().split())))

if L[5]==2 and L[7]==1:
  print('YES')
else:
  print('NO')
l1 = [int(i) for i in input().split()]
if l1.count(5) == 2 and l1.count(7) == 1:
  print('YES')
else:
  print('NO')
a = list(map(int,input().split()))
print('YES' if a.count(5)==2 and a.count(7)==1 else 'NO')
A = list(map(str,input().split()))


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

ans = 'YES' if L == [5, 5, 7] else 'NO'
print(ans)
a,b,c = 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")
a = []
a = input().split(' ')

if '5' in a:
    a.remove('5')
    if '7' in a:
        a.remove('7')
        if '5' in a:
                print('YES')
        else:
            print('NO')
    else:
        print('NO')
else:
    print('NO')
l=input().split()
print("YES" if l.count("5")==2 and l.count("7")==1 else "NO")
lis = list(map(int, input().split()))
if lis.count(5)==2 and lis.count(7)==1: print('YES')
else: print('NO')
a,b,c=map(int,input().split())
arr=[0]*100
arr[a]+=1
arr[b]+=1
arr[c]+=1

if arr[5]==2 and arr[7]==1:
  print("YES")
else:
  print("NO")
s=list(input().split())
s.sort()
d=int(s[0])*100+int(s[1])*10+int(s[2])
d=d-557
if d==0:
    print("YES")
else:
    print("NO")
a,b,c = map(int,input().split())

fcount = 0
scount = 0

if a == 5 :
  fcount += 1
elif a == 7:
  scount += 1

if b == 5 :
  fcount += 1
elif b == 7:
  scount += 1

if c == 5 :
  fcount += 1
elif c == 7:
  scount += 1

if fcount == 2 and scount == 1:
  print("YES")
else :
  print("NO")
A=list(map(int,input().split()))
print("YES" if A.count(5)==2 and A.count(7)==1 else "NO")
# -*- coding: utf-8 -*-
a = list(map(int,input().split()))
if sum(a)==17:
    print("YES")
else:
    print("NO")
nums = list(map(int, input().split(' ')))
if nums.count(5) == 2 and nums.count(7) == 1:
    print('YES')
else:
    print('NO')
l=list(map(int,input().split()))
print("YES"if l.count(5)==2 and l.count(7)==1 else"NO")
A, B, C = map(int, input().split())

import collections

tmp = []
tmp.append(A)
tmp.append(B)
tmp.append(C)

c = collections.Counter(tmp)

if c[5] == 2 and c[7] == 1:
    print("YES")
else:
    print("NO")
a, b, c = input().split()                                                  

if a == b == "5" and c == "7":
    print("YES")
elif a == c == "5" and b == "7":
    print("YES")
elif b == c == "5" and a == "7":
    print("YES")
else:
    print("NO")
N = 3

a, b, c = [int(N) for N in input().split() ]

d = 17

mylist = [5, 7]

if ( a in mylist and b in mylist and c in mylist and a + b + c == 17 ):
    print("YES")
else:
    print("NO")
a=list(map(int,input().split()))
a.sort()
if a==[5,5,7]:
    print('YES')
else :
    print('NO')
from sys import stdin, stdout


def main():
    line = stdin.readline()
    parts = line.split()
    a = int(parts[0])
    b = int(parts[1])
    c = int(parts[2])

    count5 = 0
    count7 = 0
    x = 0
    while x < 3:
        if int(parts[x]) == 5:
            count5 += 1
        elif int(parts[x]) == 7:
            count7 += 1
        x += 1

    if count5 == 2 and count7 == 1:
        rta = "YES"
    else:
        rta = "NO"

    stdout.write(rta)



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

if 5 in A and 7 in A and A.count(5) == 2:
    print("YES")
else:
    print("NO")
List = [int(i) for i in input().split()]
a = List[0]
b = List[1]
c = List[2]

if a*b*c==175:
    print("YES")
else:
    print("NO")
l = list(map(int, input().split()))

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

def answer(a: list) -> str:
    a = sorted(a)
    if a == [5, 5, 7]:
        return 'YES'
    else:
        return 'NO'

print(answer(a))
A = sorted(input().split())
print('YES' if A[0]=='5' and A[1]=='5' and A[2]=='7' else 'NO')
s = input()
if s.count("5") == 2 and s.count("7") == 1:
    print("YES")
else:
    print("NO")
import math

if sorted(input().split())==['5','5','7']:
    print('YES')
else:
    print('NO')
input_st = input().split()
input_num = [int(s) for s in input_st]
num = sorted(input_num)
if num[0] == 5 and num[1] == 5 and num[2] == 7:
    print("YES")
else:
    print("NO")
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

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

if 7 == a[0]:
    if 5 == a[1] and 5 == a[2]:
        print("YES", end="\n")
    else:
        print("NO", end="\n")   

elif 5 == a[0]:
    if (7 == a[1] and 5 == a[2]) or (5 == a[1] and 7 == a[2]):
        print("YES", end="\n")
    else:
        print("NO", end="\n")   
else:
    print("NO", end="\n")
A, B, C = [int(x) for x in input().split()]
req_fives = 2
req_seven = 1
for x in (A, B, C):
    if x == 5:
        req_fives -= 1
    elif x == 7:
        req_seven -= 1
if req_fives == 0 & req_seven == 0:
    print("YES")
else:
    print("NO")
a = input().split()

if a.count('5') == 2:
    if a.count('7') == 1:
        print('YES')
    else:
        print('NO')
else:
    print('NO')
import sys

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

if (a == 5 or a == 7):
  if (b == 5 or b == 7):
    if (c == 5 or c == 7):
      d = a * b * c
      if (d == 175):
        print("YES")
      else: print("NO")
    else: print("NO")
  else: print("NO")
else:
  print("NO")
A=sorted(list(map(int,input().split())))
if A[0] == A[1] == 5 and A[2] == 7:
 	print('YES')
else:
 	print('NO')
a=list(map(int,input().split()))
c5,c7=0,0
for i in a:
    if i==5:
        c5+=1
    elif i==7:
        c7+=1
print("YES" if(c5==2  and c7==1) else "NO")
a, b, c = map(int, input().split())
if (a, b, c) == (5, 5, 7):
  print("YES")
elif (a, b, c) == (5, 7, 5):
  print("YES")
elif (a, b, c) == (7, 5, 5):
  print("YES")
else:
  print("NO")
N = list(map(str, input().split()))
if N.count("5") == 2 and N.count("7") == 1:
  print("YES")
else:
  print("NO")
input1 = list(map(int,input().split()))
A = input1[0]
B = input1[1]
C = input1[2]
if A == 5:
  if B == 5 and C == 7:
    print("YES")
  elif B == 7 and C == 5:
    print("YES")
  else:
    print("NO")
elif A == 7:
  if B == 5 and C == 5:
    print("YES")
  else:
    print("NO")
else:
  print("NO")
from collections import Counter
abc_list = list(map(int,input().split()))
abc_counter = Counter(abc_list)
most_counter = abc_counter.most_common()
if most_counter[0][0] == 5 and most_counter[0][1] == 2:
    if most_counter[1][0] == 7 and most_counter[1][1] == 1:
        print("YES")
    else:
        print("NO")
else:
    print("NO")
l=list(map(int,input().split()))
if l.count(5)==2 and l.count(7)==1:
    print("YES")
else:
    print("NO")
S=list(map(int,input().split()))
if S.count(5)==2 and S.count(7)==1:
    print('YES')
else:
    print('NO')
s = input().split()
s5 = s.count("5")
s7 = s.count("7")
 
if s5 == 2:
    if s7 == 1:
  	    print("YES")
    else:
        print("NO")
else:
    print("NO")
l = input().split()
print("YES" if sorted(l) == ['5', '5', '7'] else "NO")
ABC = input().split()

print("YES" if ABC.count("5") == 2 and ABC.count("7") == 1 else "NO")
a,b,c=map(int,raw_input().split())
if a+b+c==17:
  print "YES"
else:
  print "NO"
s = input()
print("YES" if s.count("5") == 2 and s.count("7") == 1 else "NO")
s = list(map(int,input().split()))
count5 = 0
count7 = 0
for i in range(3):
    if s[i] == 5:
      count5 += 1
    if s[i] == 7:
      count7 +=1
if count7 == 1 and count5 == 2:
   print("YES")
else:
    print("NO")
li=a,b,c=list(map(int,input().split()))
if li.count(7)==1 and li.count(5)==2:
    print("YES")
else:
    print("NO")
S = input().split()
S.sort()
print('YES' if ''.join(S) == '557' else 'NO')
a=list(map(int,input().split()))
if a==[5,5,7] or a==[5,7,5] or a==[7,5,5]:
  print("YES")
else:
  print("NO")
from sys import stdin
input = stdin.readline

L = list(map(int, input().split()))

T = [5,5,7]

for l in L:
    if l in T:
        T.pop(T.index(l))
if T:
    print('NO')
else:
    print('YES')
if sorted(map(int,input().split()))==[5,5,7]:
  print("YES")
else:
  print("NO")
a=input().split(" ")
a=list(map(int,a))
b=a[0]*a[0]+a[1]*a[1]+a[2]*a[2]
if b==99:
    print("YES")
else :
    print("NO")
list = list(map(int, input().split()))

if list.count(5) == 2 and list.count(7) == 1:
  print('YES')
else:
  print('NO')
A,B,C=map(int,input().split())
sum = 0
if A == 5 or A ==7:
  sum += A
  if B ==5 or 7:
    sum += B
    if C ==5 or 7:
      sum += C
      if sum == 17:
        print("YES")
      else:
        print("NO")
A,B,C = list(map(int,input().split()))
d = sorted([A,B,C])
if d[0] == 5 and d[1] == 5 and d[2] == 7:
    print("YES")
else:
    print("NO")
abc = map(int, input().split())

c5 = 0
c7 = 0
for x in abc:
    if x == 5:
        c5 += 1
    if x == 7:
        c7 += 1

if c5 == 2 and c7 == 1:
    print('YES')
else:
    print('NO')
import sys
import math
 
sys.setrecursionlimit(10 ** 8)
input = sys.stdin.readline
 
def main():
    s = list(map(int,input().split()))
    if sum(s) == 17:
      print("YES")
    else:
      print("NO")
 
if __name__ == '__main__':
    main()
a,b,c = map(int,input().split())
if a == 5:
    if b == 5:
        if c == 7:
            print("YES")
        else:
            print("NO")
    if b == 7:
        if c == 5:
            print("YES")
        else:
            print("NO")
if a == 7:
    if b == 5:
        if c == 5:
            print("YES")
    else:
        print("NO")
s = input().split(" ")
# 5,7,5を判定
if s.count('5') == 2 and s.count('7') == 1:
	print("YES")
else:
	print("NO")
cmd = list( map( int, input( ).split( )))
cnt5 = 0
cnt7 = 0
for i in range( len( cmd)):
  if cmd[i] == 5:
    cnt5 +=1
  elif cmd[ i] == 7:
    cnt7 += 1
if cnt5 == 2 and cnt7 == 1:
  print( "YES")
else:
  print( "NO")
a,b,c=(int(x) for x in input().split())
nana_count=0
go_count=0
def check(x):
  if x==5:
      global go_count
      go_count+=1
  elif x==7:
      global nana_count
      nana_count+=1
check(a)
check(b)
check(c)
if nana_count==1 and go_count==2:
  print("YES")
else:
  print("NO")
A,B,C = map(int,input().split())

if A == 5 and B == 5 and C == 7:
	print("YES")
elif B == 5 and C == 5 and A == 7:
	print("YES")
elif C == 5 and A == 5 and B == 7:
	print("YES")
else:
	print("NO")
ABC=list(map(int,input().split()))
five=ABC.count(5)
seven=ABC.count(7)
if (five==2)&(seven==1):
  print("YES")
else:
  print("NO")
a = tuple(map(int, input().split()))

a5 = 0
a7 = 0
b = 0
i = 0
while i < 3:
    if a[i] == 5:
        a5 += 1
    elif a[i] == 7:
        a7 += 1
    i += 1

if a5 == 2 and a7 == 1:
    print("YES")
else:
    print("NO")
A = list(map(int,input().split()))
A.sort()
if A[0] == 5 and A[1] == 5 and A[2] == 7:
  print("YES")
else:
  print("NO")
l=list(map(int,input().split()))
if l.count(5) == 2 and 7 in l:
    print("YES")
else:
    print("NO")
a,b,c =input().split()
a = int(a)
b = int(b)
c = int(c)
if a == 5:
  if (b== 7 and c==5) or (b== 5 and c==7):
    print("YES")
  else:
    print("NO")
elif a == 7:
  if b==5 and c == 5:
    print("YES")
  else:
    print("NO")
else:
    print("NO")
s = [int(i) for i in input().split()]
s.sort()
if s == [5,5,7]:
  print("YES")
else:
  print("NO")
ABC = map(int,input().split())

if sorted(ABC) == [5,5,7]:
  print("YES")
else:
  print("NO")
#和風いろはちゃんイージー
def ABC_42_A():
    A,B,C = map(int, input().split())
    iroha = [0 for i in range(3)]
    iroha = []
    iroha.append(A)
    iroha.append(B)
    iroha.append(C)

    if iroha.count(7)==1 and iroha.count(5)==2:
        print('YES')
    else:
        print('NO')

if __name__ == '__main__':

    ABC_42_A()
def MAP(): return map(int, input().split())
a, b, c = sorted(MAP())
if a == 5 and b == 5 and c == 7:
  print("YES")
else:
  print("NO")
"""
kari1 = '7 7 5'
in1 = kari1.split()
"""
in1 = input().split()

sujiCNT = [0] * 10

for item in in1:
    sujiCNT[int(item)] = sujiCNT[int(item)] + 1

if sujiCNT[5] == 2 and sujiCNT[7] == 1:
    print('YES')
else:
    print('NO')
abc = [i for i in map(int, input().split())]
if abc.count(5) == 2 and abc.count(7) == 1:
    print('YES')
else:
    print('NO')
x = list(map(int,input().split()))
n5=0
n7=0
for i in range(len(x)):
    if(x[i]==5):n5=n5+1
    if(x[i]==7):n7=n7+1
if(n5==2 and n7==1):print("YES")
else:print("NO")
def test():
  x = input()
  x = x.split()
  if x == ['5','5','7']:
    print("YES")
  elif x == ['5','7','5']:
    print("YES")
  elif x == ['7','5','5']:
  	print("YES")
  else:
    print("NO")

test()
l = input().split()

if l.count('5') == 2 and l.count('7') == 1:
    print('YES')
else:
    print('NO')
s,t,u=map(int,input().split())
if s+t+u==17:
    print("YES")
else:
    print("NO")
def check():
  A = list(map(int, input().split()))
  if A.count(5)!=2 or A.count(7)!=1:
    return 'NO'
  return 'YES'
print(check())
import sys

input = sys.stdin.readline


def main():
    A, B, C = map(int, input().split())

    cnt_5 = 0
    for i in [A, B, C]:
        if i == 5:
            cnt_5 += 1

    cnt_7 = 0
    for i in [A, B, C]:
        if i == 7:
            cnt_7 += 1

    if cnt_5 == 2 and cnt_7 == 1:
        print("YES")
    else:
        print("NO")


if __name__ == "__main__":
    main()
import sys
input = sys.stdin.readline
A = [int(x) for x in input().split()]
cnt_5 = 0
cnt_7 = 0
for i in A:
    if i == 5:
        cnt_5 += 1
    elif i == 7:
        cnt_7 += 1
if cnt_5 == 2 and cnt_7 == 1:
    print("YES")
else:
    print("NO")
# coding: utf-8

input_ = input().split()

count_5 = 0
count_7 = 0

for i in input_:
    if i == '5':
        count_5 += 1
    elif i == '7':
        count_7 += 1

if count_5 == 2 and count_7 == 1:
    print('YES')
else:
    print('NO')
a, b, c = map(int, input().split())

if a == 5:
  if (b == 5 and c == 7) or (b == 7 and c == 5):
    print('YES')
  else:
    print('NO')
elif b == 5:
  if (a == 5 and c == 7) or (a == 7 and c == 5):
    print('YES')
  else:
    print('NO')
elif c == 5:
  if (a == 5 and b == 7) or (a == 7 and b == 5):
    print('YES')
  else:
    print('NO')
else:
    print('NO')
a,b,c = map(int, input().split())
if a==b and b<c: print("YES")
elif b==c and c<a: print("YES")
elif c==a and a<b: print("YES")
else: print("NO")
nums = input().split()
nums.sort()
print( "YES" if ["5","5","7"] == nums else "NO" )
L = [int(x) for x in input().split()]
L.sort()

if L == [5,5,7]:
    print("YES")
else:
    print("NO")
def test(): 
  arr = input()
  arr = arr.split()
  arr = sorted(arr)
  if arr==['5', '5', '7']:
    print("YES")
  else:
    print("NO")  
test()
i = list(map(int, input().split()))

if 7 in i:
  i.remove(7)
  if i[0] == 5 and i[1] == 5:
    print('YES')
  else:
    print('NO')
else:
  print('NO')
a,b,c = map(int,input().split())
if ( (a+b+c ==17) and (a==5 or b==5 or c==5) and (a==7 or b==7 or c==7)):
    print("YES")
else:
    print("NO")
l = list(map(int, input().split()))

if l.count(5) == 2 and l.count(7) == 1:
    print('YES')
else:
    print('NO')
numbers=input()

numbers_list=numbers.split(' ')

if numbers_list.count('5')==2 and numbers_list.count('7')==1:
  print('YES')
else:
  print('NO')
a, b, c = map(int, input().split())

sor_len_list = sorted([a, b, c])

if sor_len_list == [5, 5, 7]:
    print('YES')
else:
    print('NO')
List=input().split()
print("YES" if List.count("5")==2 and List.count("7")==1 else "NO")
a, b, c = map(int, input().split(' '))
if a + b + c != 17:
  print('NO')
elif a * b * c != 175:
  print('NO')
else:
  print('YES')
print("YNEOS"[sorted(map(int, input().split()))!=[5,5,7]::2])
a, b, c = map(int, input().split())

d = a + b + c

if d == 17:
  print('YES')
else:
  print('NO')
arr = list(map(int, input().split()))
arr = sorted(arr)

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

for i in a:
    if(i == 5):
        fives += 1
    elif(i == 7):
        sevens += 1

if((fives == 2) and (sevens == 1)):
    print("YES")
else:
    print("NO")
A,B,C=map(int,input().split())
if A==5:
    if B==7:
        if C==5:
            print('YES')
        else:
            print('NO')
    elif B==5:
        if C==7:
            print('YES')
        else:
            print('NO')
    else:
        print('NO')
elif A==7:
    if B==C==5:
        print('YES')
    else:
        print('NO')
else:
    print('NO')
"""
ABC042 A 和風いろはちゃんイージー
https://atcoder.jp/contests/abc042/tasks/abc042_a
"""

l = list(map(int, input().split()))
l5 = l.count(5)
l7 = l.count(7)

if l5 == 2 and l7 == 1:
    print("YES")
else:
    print("NO")
if sorted(list(map(int, input().split()))) == [5, 5, 7]:
  print('YES')
else:
  print('NO')
from sys import stdin,stdout

def main():
    line=stdin.readline()
    parts=line.split()
    a=int(parts[0])
    b=int(parts[1])
    c= int(parts[2])
    l=[a,b,c]
    l.sort()
    if l[0]==5 and l[1]==5 and l[2]==7:
        stdout.write("YES")
    else:
        stdout.write("NO")
main()
print('YNEOS'[sorted(list(map(int,input().split())))!=[5,5,7]::2])
words = list(map(int, input().split()))
if words.count(7) == 1 and words.count(5) == 2:
    print('YES')
else:
    print('NO')
abc =input()
five = abc.count("5")
seven = abc.count("7")

if five==2 and seven==1:
  print("YES")
else:
  print("NO")
X = input()
print("YES" if X.count("5") == 2 and X.count("7") == 1 else "NO")
example = ('5', '7', '5')
five = 0
seven = 0
ipt = []
s = input()
s = s.split()

for i in s:
    if i == '5':
        five += 1
    elif i == '7':
        seven += 1

if five == 2 and seven == 1:
    print("YES")
else:
    print("NO")
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    ABC = list(map(int, input().split()))
    print('YES' if ABC.count(5) == 2 and ABC.count(7) == 1 else 'NO')


if __name__ == "__main__":
    main()
L = list(map(int,input().split()))
cnt = 0

for i in range(3):
         cnt += L[i]
         
if cnt == 17:
         print("YES")

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

if L[1]==5:
  print("YES")
else:
  print("NO")
s_lst= list(input().split())
s_lst.sort()
ans = "YES" if "".join(s_lst)=="557" else "NO"
print(ans)
p=list(map(int,input().split()))
p.sort()
if p==[5,5,7]:
    print("YES")
else:
    print("NO")
def main():
    abc = ''.join(sorted(input().replace(' ', '')))
    print('YES' if abc == '557' else 'NO')


if __name__ == '__main__':
    main()
L = list(map(int,input().split()))
if L.count(5) == 2 and L.count(7) == 1:
  print("YES")
else:
  print("NO")
abc = list(map(int,input().split()))
haiku = [5,7,5]

for i in range(3):
    if haiku[i] in abc:
        abc.remove(haiku[i])
    else:
        print("NO")
        break
else:
    print("YES")
a, b, c = map(int, input().split())
print('YES' if a+b+c == 17 else 'NO')
A,B,C=map(int,input().split())
if (A==B and A==5 and C==7) or (A==C and A==5 and B==7) or (B==C and B==5 and A==7):
  print("YES")
else:
  print("NO")
a = input()
if a.count("5") == 2 and a.count("7") == 1:
    print("YES")
else:
    print("NO")
a, b, c = map(int, input().split())
if sorted((a, b, c)) == [5, 5, 7]:
  print("YES")
else:
  print("NO")