Problem:
 Score : 100 points    Problem Statement Iroha loves Haiku . Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with 5 , 7 and 5 syllables, in this order.  To create a Haiku, Iroha has come up with three different phrases. These phrases have A , B and C syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.      Constraints  1≦A,B,C≦10         Input The input is given from Standard Input in the following format:  A  B  C       Output If it is possible to construct a Haiku by using each of the phrases once, print YES (case-sensitive). Otherwise, print NO .        Sample Input 1 5 5 7      Sample Output 1 YES  Using three phrases of length 5 , 5 and 7 , it is possible to construct a Haiku.       Sample Input 2 7 7 5      Sample Output 2 NO

Solution (Python):
s = input()
if s.count('5') == 2 and s.count('7') == 1:
    print('YES')
else:
    print('NO')

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

Solution (Python):
a= input().split()
a.sort()
if "".join(a) =="557":
  print("YES")
else:
  print("NO")

Solution (Python):
import sys
from itertools import permutations

a = tuple(int(x) for x in sys.stdin.readline().split())

def main():
    for p in set(permutations([5, 5, 7], 3)):
        if a == p:
            return 'YES'
    return 'NO'

if __name__ == '__main__':
    ans = main()
    print(ans)

Solution (Python):
a = input().split(' ')
a.sort()

if ''.join(a) == '557':
    print('YES')
else:
    print('NO')

Solution (Python):
a=input().split()
a=[int(i) for i in a]
a.sort()
if a[0]==5 and a[1]==5 and a[2]==7:
	print("YES")
else:
 	print("NO")

Solution (Python):
a=input().split()
a=[int(i) for i in a]
a.sort()
if a[0]==5 and a[1]==5 and a[2]==7:
	print("YES")
else:
 	print("NO")

Solution (Python):
a, b, c = map(str, input().split())

if a == '5' and b == '5':
    if c == '7':
        print('YES')
        exit(0)

if b == '5' and c == '5':
    if a == '7':
        print('YES')
        exit(0)

if a == '5' and c == '5':
    if b == '7':
        print('YES')
        exit(0)

print('NO')

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

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

Solution (Python):
n = input().split()
print('YES' if n.count('5') == 2 and n.count('7') == 1 else 'NO')

Solution (Python):
a = input().split()
if  int(a[0])+int(a[1])+int(a[2]) == 17:
  print("YES")
else:
  print("NO")

Solution (Python):

a = [5,5,7]
b = list(map(int, input().split()))

for i in a:
    if i in b:
        b.remove(i)

if len(b) == 0:
    print("YES")
else:
    print("NO")

Solution (Python):
lst = list(int(i) for i in input().split())
if (lst.count(7) == 1 and lst.count(5) == 2):
    print('YES')
else:
    print('NO')

Solution (Python):
import collections

a = collections.Counter(input().split())

print('YES' if a['5'] == 2 and a['7'] ==1 else 'NO')

Solution (Python):
import collections

abc = collections.Counter(input().split())

print('YES' if abc['5'] == 2 and abc['7'] == 1 else 'NO')

Solution (Python):
print("YNEOS"["".join(sorted(input().split()))!="557"::2])

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



sum = 0
if a == 5:
    sum += 1
elif a == 7:
    sum += 2

if b == 5:
    sum += 1
elif b == 7:
    sum += 2

if c == 5:
    sum += 1
elif c == 7:
    sum += 2

if sum == 4:
    print('YES')
else:
    print(('NO'))

Solution (Python):
a_list = [ int(x) for x in input().split(" ") ]
a_list.sort()
print("YES") if a_list == [5, 5, 7] else print("NO")

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

Solution (Python):


value = input()

list = value.split()

sum = 0

for i in range(len(list)):
  if list[i] == "5":
    sum += 1
    
if sum == 2:
  print("YES")
else:
  print("NO")

Solution (Python):
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")

Solution (Python):
li = list(map(int, input().split()))

print("YES" if li.count(5) == 2 and li.count(7) == 1 else "NO")

Solution (Python):
a = list(map(int, input().split()))
n5 = a.count(5)
n7 = a.count(7)
if n5 == 2 and n7 == 1:
    print("YES")
else:
    print("NO")

Solution (Python):
ls = list(map(str, input().split()))

ls.sort()

if ("".join(ls) == "557"):
    print("YES")
else:
    print("NO")

Solution (Python):
a = list(map(int,input().split()))

num5 =  a.count(5)
num7 = a.count(7)

if(num5 == 2 and num7 == 1):
  print("YES")
else:
  print("NO")

Solution (Python):
input_list = list(map(int, input().split()))

five = input_list.count(5)
seven = input_list.count(7)

if five == 2 and seven == 1:
  print('YES')
else:
  print('NO')

Solution (Python):

haiku= input()



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

Solution (Python):
Liste= list(map(str,input().split()))
P = Liste.count('5')
Q = Liste.count('7')
if P == 2 and Q == 1:
    print('YES')
else:
    print('NO')

Solution (Python):



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

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

Solution (Python):
a = list(map(int,input().split()))
cnt_5=0
cnt_7=0
for i in range(3):
  if a[i]==5:
    cnt_5=cnt_5+1
  elif a[i]==7:
    cnt_7=cnt_7+1
 
if cnt_5 == 2 and cnt_7 == 1:
  print('YES')
else:
  print('NO')

Solution (Python):
a = list(map(int,input().split()))
cnt_5=0
cnt_7=0
for i in range(3):
  if a[i]==5:
    cnt_5=cnt_5+1
  elif a[i]==7:
    cnt_7=cnt_7+1

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

Solution (Python):
A=input().split()
if A==["5","5","7"] or A==["5","7","5"] or A==["7","5","5"]:
  print("YES")
else:
  print("NO")

Solution (Python):
A, B, C = sorted(map(int, input().split()))

if (A, B, C) == (5, 5, 7):
    print("YES")
else:
    print("NO")

Solution (Python):
a = input().rstrip().split()
count5=0
count7=0
for i in range(len(a)):

    if int(a[i]) == 5:
        count5+=1
    elif int(a[i])== 7:
        count7+=1

if count5==2 and count7==1:
    print("YES")
else:
    print("NO")

Solution (Python):
a = list(input().split())
if a.count("5") == 2 and a.count("7")==1:
  print("YES")
else:
  print("NO")

Solution (Python):
a= input().split()
b= sum(int(i) for i in a)
if b== 17:
  print('YES')
else:
  print('NO')

Solution (Python):


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

if(a*b*c == 175 and a+b+c == 17):
  print("YES")
else:
  print("NO")

Solution (Python):


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

if(a*b*c == 175 and a+b+c == 17):
  print("YES")
else:
  print("NO")

Solution (Python):
L = list(map(int, input().split()))
L.sort()
if L == [5, 5, 7]:
    print('YES')
else:
    print('NO')

Solution (Python):
l = list(map(int,input().split()))
l.sort()
if l == [5,5,7]:
    print("YES")
else:
    print("NO")

Solution (Python):



line = input()


five_cnt = line.count('5')
seven_cnt = line.count('7')


if five_cnt == 2 and seven_cnt == 1:
    print("YES")
else:
    print("NO")

Solution (Python):
lst = [int(i) for i in input().split()]

if lst in [[5, 5, 7], [5, 7, 5], [7, 5, 5]]:
    print('YES')
else:
    print('NO')

Solution (Python):
lst = [int(i) for i in input().split()]

if lst in [[5, 5, 7], [5, 7, 5], [7, 5, 5]]:
    print('YES')
else:
    print('NO')

Solution (Python):
tanka=[]
tanka=[int(x) for x in input().split()]
i=0
fiv=0
sev=0


while i < 3:
	if tanka[i]==5:
		fiv += 1
	elif tanka[i]==7:
		sev += 1
	i+=1

if fiv==2 and sev==1:
	print("YES")
else:
	print("NO")

Solution (Python):
abc = input()

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

Solution (Python):
a=list(map(int,input().split()))
a.sort()
if a == [5,5,7]:
  print("YES")
else:
  print("NO")

Solution (Python):
import collections
numbers = input().split()

c = collections.Counter(numbers)

if c['5'] == 2 and c['7'] == 1:
    print('YES')
else :
    print('NO')

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

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

Solution (Python):
from sys import stdin
import math

li = list(map(int,stdin.readline().rstrip().split()))

li.sort()

if li == [5,5,7]:
    print("YES")
else:
    print("NO")

Solution (Python):
num_list = map(int,input().split())

seven_num = 0
five_num = 0

for number in num_list:
  if number == 7:
    seven_num += 1
  elif number == 5:
    five_num += 1
    
if seven_num ==1 and five_num == 2:
  print("YES")
else:
  print("NO")

Solution (Python):

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

Solution (Python):
lengchs = list(map(int, input().split()))
lengchs.sort()

if lengchs[0] == 5 and lengchs[1] == 5 and lengchs[2] == 7 :
    print("YES")
else:
    print("NO")

Solution (Python):
A, B, C = map(int, input().split())

if A==7:
    if B==5:
        if C==5:
            print("YES")
        else:
            print("NO")
    else:
        print("NO")
elif 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")
else:
    print("NO")

Solution (Python):
A, B, C = map(int, input().split())

if (A ==7) and (B==C==5):
    print("YES")
elif (A==C==5) and (B==7):
    print("YES")
elif (A==B==5) and (C==7):
    print("YES")
else:
    print("NO")

Solution (Python):
A,B,C=map(int,input().split())

if 7==A: 
    if 5==B:
        if 5==C:
            print("YES")
        else:
            print("NO")
    elif 5==C:
        if 5==B:
            print("YES")
        else:
            print("NO")
    else:
        print("NO")

elif 7==B: 
    if 5==A:
        if 5==C:
            print("YES")
        else:
            print("NO")
    elif 5==C:
        if 5==A:
            print("YES")
        else:
            print("NO")
    else:
        print("NO")

elif 7==C: 
    if 5==B:
        if 5==A:
            print("YES")
        else:
            print("NO")
    elif 5==A:
        if 5==B:
            print("YES")
        else:
            print("NO")
    else:
        print("NO")

Solution (Python):
a = list(int(x) for x in input().split())
if a == [5,5,7] or a == [5,7,5] or a == [7,5,5]:
  print('YES')
else:
  print('NO')

Solution (Python):
A,B,C = map(str,input().split())
haiku = A+B+C
flag = 0
if haiku == "755":
  flag = 1
elif haiku == "575":
  flag = 1
elif haiku == "557":
  flag = 1
else:
  print("NO")
if flag == 1:
  print("YES")

Solution (Python):
a = list(map(int, input().split()))

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

Solution (Python):
myList=[]
myList_int=[]
myList=input().split() 
myList_int=[int(s) for s in myList] 



if myList_int== [7,5,5]:
    print("YES")
elif myList_int== [5,7,5] :
    print("YES")
elif myList_int== [5,5,7] :
    print("YES")
else:
    print("NO")

Solution (Python):
myList=[]
myList_int=[]
myList=input().split() 
myList_int=[int(s) for s in myList] 



if myList_int== [7,5,5]:
    print("YES")
elif myList_int== [5,7,5] :
    print("YES")
elif myList_int== [5,5,7] :
    print("YES")
else:
    print("NO")

Solution (Python):
input_line = input()
input_list = [int(x) for x in input_line.split()]

five_counter = 0
seven_counter = 0
for i in input_list:
    if i==7:
        seven_counter+=1
    elif i==5:
        five_counter+=1
if seven_counter==1 and five_counter==2:
    print('YES')
else:
    print('NO')

Solution (Python):
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")

Solution (Python):
A, B, C = [int(n) for n in input().split()]

if A == 5:
  if B == 5:
    answer = C == 7
  elif B == 7:
    answer = C == 5
  else:
    answer = False
elif A == 7:
  if B == 5:
    answer = C == 5
  else:
    answer = False
else:
  answer = False

if answer:
  print('YES')
else:
  print('NO')

Solution (Python):
input_line = input()
statements = input_line.split(' ')
five=0
seven=0
no=0
for statement in statements:
    if int(statement) == 5:
        five += 1
    elif int(statement) ==7:
        seven += 1
    else:
        no += 1

if five == 2 and seven == 1:
    print('YES')
else:
    print('NO')

Solution (Python):
s = list(map(int, input().split()))

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

Solution (Python):
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")

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

Solution (Python):
s=input().split();print("NYOE S"[s.count('7')==1 and s.count('5')==2::2])

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

countlist=[a,b,c]
if countlist.count(5) ==2 and countlist.count(7)==1:
    print('YES')
else:
    print('NO')

Solution (Python):
s=input().split()
if s.count('5')==2 and s.count('7')==1:
    print('YES')
else:
    print("NO")

Solution (Python):
abc = list(map(int, input().split()))
abc.sort()

if abc[0]==5 and abc[1]==5 and abc[2]==7:
    print("YES")
else:
    print("NO")

Solution (Python):
a=input().split()
print("YES" if a.count("5")==2 and a.count("7")==1 else "NO")

Solution (Python):
a, b, c = map(int, input().split())
if (a==5 and b ==5 and c==7) or (a==5 and b==7 and c==5) or (a ==7 and b==5 and c==5):
    print('YES')
else:
    print('NO')

Solution (Python):
x = input().split()
if x.count('5') == 2 and x.count('7') ==1:
  print("YES")
else:
  print("NO")

Solution (Python):
A, B, C = map(int, input().split())

l = [5, 5, 7]

def main(A=A, B=B, C=C):
    if A in l:
        l.remove(A)
        if B in l:
            l.remove(B)
            if C in l:
                return 'YES'
    return 'NO'

if __name__ == '__main__':
    result = main()
    print(result)

Solution (Python):
s =map(int,input().split())

r=0
for i in s:
  if i in [5,7]:
    r=r+i
    
if r==17:
  print("YES")
else:
  print("NO")

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

Solution (Python):

A,B,C = input().split()
A = int(A)
B = int(B)
C = int(C)

if A*B*C == 5*5*7 and A+B+C == 5+5+7:
    print("YES")
else:
    print("NO")

Solution (Python):
ABC = [int(i) for i in input().split()]
ABC.sort()
if sum(ABC) == 17 and ABC[0] == 5 and ABC[2] == 7:
    print("YES")
else:
    print("NO")

Solution (Python):











import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,log 
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    A=LI()
    A=tuple(sorted(A))
    if A==(5,5,7):
        print("YES")
    else:
        print("NO")
if __name__ == '__main__':
    main()

Solution (Python):
a,b,c = map(int, input().split())
 
if a == 5:
  if b == 5:
    if c == 5:
      print('NO')
    else:
      print('YES')
  else:
    if c == 5:
      print('YES')
    else:
      print('NO')
else:
  if b == 5:
    if c == 5:
      print('YES')
    else:
      print('NO')
  else:
    print('NO')

Solution (Python):
A,B,C = map(int, input().split())
if A==7 and B==5 and C==5:
  print("YES")
elif A==5 and B==5 and C==7:
  print("YES")
elif A==5 and B==7 and C==5:
  print("YES")
else:
  print("NO")

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

if a+b+c==17 and a*b*c==175:
    print("YES")
else:
    print("NO")

Solution (Python):
abc = list(map(int,input().split()))
f_count = 0
s_count = 0
for num in abc:
    if num==5:
        f_count += 1
    elif num==7:
        s_count += 1
if f_count==2 and s_count==1:
    print("YES")
else:
    print("NO")

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

Solution (Python):
import math

line = input()
a, b, c = [int(x) for x in line.split()]
if (max(a, b, c) == 7 and min(a, b, c) == 5 and a + b + c == 17):
	print("YES")
else:
	print("NO")

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

Solution (Python):
a=sorted(map(int,input().split()))
print("YNEOS"[a!=[5,5,7]::2])

Solution (Python):
a,b,c = map(int,input().split())
haiku = {5:2,7:1}
haiku[a] -=1
haiku[b] -=1
haiku[c] -=1
flag = True
for val in haiku.values():
  if val==0:
    continue
  else:
    flag = False
    
print('YES' if flag else 'NO')

Solution (Python):
a = input()
res = a.split(' ')
if res.count('5') == 2 and res.count('7') == 1:
  print('YES')
else:
  print('NO')

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

if a * b * c == 175:
    print("YES")
else:
    print("NO")

Solution (Python):
n=input().split()
print("YES" if n.count("5")==2 and n.count("7")==1 else "NO")

Solution (Python):
n=input().split()
print("YES" if n.count("5")==2 and n.count("7")==1 else "NO")

Solution (Python):
n=input().split()
print("YES" if n.count("5")==2 and n.count("7")==1 else "NO")

Solution (Python):
n=input().split()
print("YES" if n.count("5")==2 and n.count("7")==1 else "NO")

Solution (Python):
a,b,c=map(int,input().split())
print("YES" if a==b==5 and c==7 or a==c==5 and b==7 or a==7 and b==c==5 else "NO")

Solution (Python):
A = list(map(int, input().split()))

Five=A.count(5)

Seven = A.count(7)

if Five == 2 and Seven == 1:
    print("YES")
else:
    print("NO")

Solution (Python):

nums = input().split()
a = int(nums[0])
b = int(nums[1])
c = int(nums[2])

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

Solution (Python):
abc = [int(i) for i in input().split()]

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

Solution (Python):
ABC=[int(x) for x in input().split()]
ABC.sort()
print('YES' if ABC == [5,5,7] else 'NO')

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

Solution (Python):
in_ = input().split()

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

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

Solution (Python):


A,B,C=list(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")

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

Solution (Python):


def getlist():
	return list(map(int, input().split()))



nums = getlist()

nums.sort()

if nums[0] == 5 and nums[1] == 5 and nums[2] == 7:
	print('YES')
else:
	print('NO')

Solution (Python):

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

nums.sort()

if nums[0] == 5 and nums[1] == 5 and nums[2] == 7:
	print('YES')
else:
	print('NO')

Solution (Python):

import sys, math, itertools, heapq, collections, bisect, fractions
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
sys.setrecursionlimit(10**8)
inf = float('inf')
ans = count = 0

A=list(map(int,input().split()))
a=b=0
for ai in A:
    if ai==5:
        a+=1
    elif ai==7:
        b+=1
if a==2 and b==1:
    print("YES")
else:
    print("NO")

Solution (Python):
s = input()
print('YES' if s.count('5')==2 and s.count('7')==1 else 'NO')

Solution (Python):
a = [5, 5, 7]

b = [int(c) for c in input().split()]
d = sorted(b)

if a == d:
  print('YES')
else:
  print('NO')

Solution (Python):
list_num = input().split()
fives = 0
sevens = 0
for i in list_num:
  if i == "5":
    fives += 1
  if i == "7":
    sevens += 1
if fives == 2 and sevens == 1:
  print("YES")
else:
  print("NO")

Solution (Python):
a, b, c = map(int, input().split())
if sorted((a, b, c)) == [5, 5, 7]:
  print('YES')
else:
  print('NO')

Solution (Python):
A = input().split()
if A.count('5') == 2 and A.count('7')==1:
	print("YES")
else:
	print("NO")

Solution (Python):
N=input()
N=N.split()
sum=0
flag1=0
flag2=0
for i in N:
    if(i=="5"):
        flag1=1
    if(i=="7"):
        flag2=1
    sum=sum+int(i)
if(sum == 17 and flag1 == 1 and flag2 == 1):
    print("YES")
else:
    print("NO")

Solution (Python):
a= input().split()
if a.count('5')==2 and a.count('7')==1:
            print('YES')
else:
            print('NO')

Solution (Python):
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:
      if A + B + C == 17:
        print('YES')
      else:
        print('NO')
    else:
      print('NO')
  else:
  	print('NO')
else:
  print('NO')

Solution (Python):
a, b, c = map(int, input().split())
l = [a,b,c]
c5 = l.count(5)
c7 = l.count(7)

if c5 == 2 and c7 == 1:
    print("YES")
else:
    print("NO")

Solution (Python):
print("YES" if sorted([int(a) for a in input().split()]) == [5, 5, 7] else "NO")

Solution (Python):
S = input()
print('YES' if S.count('5') == 2 and S.count('7') == 1 else 'NO')

Solution (Python):
a = [x for x in input().split()]
cnt_5 = 0
cnt_7 = 0
for x in a:
    if x == '5':
        cnt_5 += 1
    elif x == '7':
        cnt_7 += 1

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

Solution (Python):


myList=[]
myList_int=[]
myList=input().split() 
myList_int=[int(s) for s in myList] 



if myList_int== [7,5,5]:
    print("YES")
elif myList_int== [5,7,5] :
    print("YES")
elif myList_int== [5,5,7] :
    print("YES")
else:
    print("NO")

Solution (Python):
l = list(map(int,input().split()))
l.sort()
if l[0]==5 and l[1]==5 and l[2]==7 :
  print('YES')
else:
  print('NO')

Solution (Python):
i = list(map(int, input().split(" ")))




if  [5, 5, 7] == sorted(i):
    print("YES")
else:
    print("NO")

Solution (Python):
a = list(map(int, input().split()))
a.sort()
ans = [5, 5, 7]
if ans == a:
    print('YES')
else:
    print('NO')

Solution (Python):
haiku = input()
lis_haiku = haiku.split()
if lis_haiku.count("5") == 2 and lis_haiku.count("7") ==1:
    print("YES")
else:
    print("NO")

Solution (Python):
haiku = input()
lis_haiku = haiku.split()
if lis_haiku.count("5") == 2 and lis_haiku.count("7") == 1:
  print("YES")
else:
  print("NO")

Solution (Python):
a, b, c = map(int, input().split())
haiku = [a, b, c]
count=0
for i in haiku:
    if i == 5:
        count += 1
        
if count == 2:
    print("YES")
else:
    print("NO")

Solution (Python):
s = input()
print("YES" if s.count("5")==2 and s.count("7")==1 else "NO")

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

Solution (Python):
A, B, C = [int(i) for i in 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")

Solution (Python):
A,B,C=map(int,input().split())
if (A==5 and B==5 and C==7) or (A==5 and B==7 and C==5) or (A==7 and B==5 and C==5):
    print('YES')
else:
    print('NO')

Solution (Python):
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")

Solution (Python):
a,b,c=map(int, input().split())
box = [a,b,c]
count1 = box.count(5)
count2 = box.count(7)
if count1 == 2 and count2 ==1:
    print('YES')
else:
    print('NO')

Solution (Python):
a,b,c=map(int,input().split())
print('YES' if a+b+c==17 and a*b*c==175 and max(a,b,c)==7 and min(a,b,c)==5  else'NO')

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

lst = [a, b, c]

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

Solution (Python):
a, b,c = map(int, input().split())
list = sorted([a,b,c])
if [5,5,7] == list :
  print("YES")
else :
  print("NO")

Solution (Python):
a = [int(item) for item in input().split()]
a.sort()
if a[0] == 5 and a[1] == 5 and a[2] == 7:
  print("YES")
else:
  print("NO")

Solution (Python):
n = list(map(int, input().split()))

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

Solution (Python):
A,B,C = (int(num) for num in input().split())

if A>B:
    par1= A
    A=B
    B=par1

if B>C:
    par2 = B
    B=C
    C=par2
    
if A==5 and B==5 and C==7:
    print('YES')
else:
    print('NO')

Solution (Python):
def main():
    ABC = list(int(x) for x in input().split())
    ans = 'NO'

    if sorted(ABC)==[5, 5, 7]:
        ans = 'YES'

    print(ans)

if __name__ == '__main__':
    main()

Solution (Python):
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")

Solution (Python):
A = list(map(int,input().split()))
A.sort()
if A == [5,5,7]:
    print("YES")
else:
    print("NO")

Solution (Python):
a = input().split()
a = [int(a[i]) for i in range(3)]

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

Solution (Python):
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")

Solution (Python):
a,b,c=map(int,input().split())
if a==5 and c==5:
    if b==7:
        print("YES")
    else:
        print("NO")
else:
    if a==5 and b==5 or b==5 and c==5:
        if c==7 or a==7:
            print("YES")
        else:
            print("NO")
    else:
        print("NO")

Solution (Python):
a, b, c = (int(i) for i in input().split())
d=(a+b+c)/17
e=(max(a,b)-2+max(a,c)+max(b,c))/17
     
if(d==1 and e==1): print("YES")
else: print("NO")

Solution (Python):
a = [int(i) for i in input().split(" ")]
if [5,5,7] == sorted(a):
  print("YES")
else:
  print("NO")

Solution (Python):
a = list(map(int , input().split()))
a.sort()
if a == [5,5,7]:
    print("YES")
else:
    print("NO")

Solution (Python):
a=list(map(int,input().split()))
if sorted(a)==[5,5,7]:
  print("YES")
else:
  print("NO")

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

Solution (Python):
s = list(map(int, input().split()))

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

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

if a + b + c == 17:
    if (a == 5 and b == 5) or (b == 5 and c == 5) or (c == 5 and a == 5):
        ans = "YES"
    else:
        ans = "NO"
else:
    ans = "NO"

print(ans)

Solution (Python):
l=input().split()
print(["NO","YES"][l.count("7")==1 and l.count("5")==2])

Solution (Python):
A,B,C = [int(i) for i in input().split()]
list = [A,B,C]
go = 0
nana = 0
for i in list:
  if i == 5:
    go += 1
  if i == 7:
    nana += 1

if go == 2 and nana == 1:
  print("YES")
else:
  print("NO")

Solution (Python):
A,B,C=map(int,input().split())
if (A==B==5 and C==7 ) or (A==C==5 and B==7) or (B==C==5 and A==7):
  print("YES")
else:
  print("NO")

Solution (Python):

import sys
input = sys.stdin.readline


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

Solution (Python):
l=[int(_) for _ in input().split()]
l.sort()
if l[0]==5 and l[1]==5 and l[2]==7:print('YES')
else:print('NO')

Solution (Python):
data=input().split()

a=data.count("5")
b=data.count("7")

if a==2 and b==1:
  print("YES")
else:
  print("NO")

Solution (Python):
abc = sorted(list(map(int, input().split())))
print('YES' if abc == [5, 5, 7] else 'NO')

Solution (Python):
ls = sorted(list(map(int,input().split())))
print('YES' if ls == [5, 5, 7] else 'NO')

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

Solution (Python):
import sys
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
ABC = LI()
ABC.sort()
ans = "NO"
if ABC==[5,5,7]:
  ans = "YES"
print(ans)

Solution (Python):



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


list = []
list.append(a)
list.append(b)
list.append(c)


list.sort()

if(list[0] == 5 and list[1] == 5 and list[2] == 7):
  print("YES")
else:
  print("NO")

Solution (Python):
a = list(map(int, input().split()))

A = a[0] + a[1]
if(A==10 or A==12):
  if (a[0] == 7):
    if(a[2] == 5 and a[1] == 5):
      print('YES')
    else:
      print('NO')
  elif (a[1] == 7):
    if(a[2] == 5 and a[0] == 5):
      print('YES')
    else:
      print('NO')
  elif (a[2] == 7):
    if(a[0] == 5 and a[1] == 5):
      print('YES')
    else:
      print('NO')
  else:
    print('NO')
else:
  print('NO')

Solution (Python):
A,B,C = map(int, input().split())
if (A==5 and B==7 and C==5) or (A==5 and B==5 and C==7) or(A==7 and B==5 and C==5):
    print("YES")
else:
    print("NO")

Solution (Python):
Data = list(map(int,input().split()))
Data.sort()
if Data[0] == 5 and Data[1] == 5 and Data[2] == 7:
    print('YES')
else:
    print('NO')

Solution (Python):
num_list = list(map(int, input().split()))
print('YES' if num_list.count(5) == 2 and num_list.count(7) == 1 else 'NO')

Solution (Python):
f=lambda l:sum(l)==17 and max(l)==7 and min(l)==5
print('YES' if f(list(map(int,input().split()))) else 'NO')

Solution (Python):
ABClist =  list(map(int, input().split()))
five = 0
seven = 0

for i in range(len(ABClist)):
  if ABClist[i] == 5:
    five += 1
  if ABClist[i] == 7:
    seven += 1
    
if five == 2 and seven == 1:
  print('YES')
else:
  print('NO')

Solution (Python):
A,B,C = map(int,input().split())
S = A+B+C
if S == 17:
    S = S - max(A, B, C)
    if S == 10:
        S = S - min(A, B, C)
        if S == 5:
            print("YES")
        else:
            pass
    else:
        pass
else:
    print("NO")

Solution (Python):
nums = [int(i) for i in input().split()]
if len(nums) == 3:
    if nums.count(5) == 2 and nums.count(7) == 1:
        print("YES")
    else:
        print("NO")

Solution (Python):
abc_list = list(map(int, input().split()))

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