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):
ABC = [int(i) for i in input().split()]
count5 = 0
count7 = 0
ans = "NO"

for i in ABC:
    if i == 5: count5 += 1
    if i == 7: count7 += 1

if count5 == 2 and count7 == 1:
    ans = "YES"

print(ans)

Solution (Python):
x = 0
y = 0
for s in input().split():
    if s == "5":
        x += 1
    elif s == "7":
        y += 1
if x == 2 and y == 1:
    print("YES")
else:
    print("NO")

Solution (Python):
arr = list(map(int, input().split()))
d = {
    5:0,
    7:0,
    }
for x in arr:
    d[x] += 1
print('YES' if d[5] == 2 and d[7] == 1 else 'NO')

Solution (Python):

n1=[5,5,7]
n=[int(i) for i in input().split()]
n.sort()
if(n==n1):
  print("YES")
else:
  print("NO")

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

Addition = A+B+C
if Addition != 17:
    haiku = False
else:
    if ((A==5 or A==7) and (B==5 or B==7) and (C==5 or C==7)):
        haiku = True
    else:
        haiku = False
    
if haiku:
    print("YES")
else:
    print("NO")

Solution (Python):
print(['NO','YES'][sorted(input().split())==['5','5','7']])

Solution (Python):
a, b, c = sorted(list(map(int, input().split())))
if(a == 5 and b == 5 and c == 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 = list(map(int,input().split()))

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

Solution (Python):
a, b, c = map(int, raw_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):
a, b, c = [int(i) for i in input().split()]

if a == 7:
    if b == 5 and c == 5:
        print("YES")
    else:
        print("NO")
elif a == 5:
    if b == 5 and c == 7:
        print("YES")
    elif b == 7 and c == 5:
        print("YES")
    else:
        print("NO")
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):
A, B, C = list(map(int, input().split()))
X = [A, B, C]
if X.count(5) == 2 and X.count(7) == 1:
	print("YES")
else:
	print("NO")

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

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

line.sort()

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

Solution (Python):
s=sorted(list(map(int,input().split())))
if s==[5,5,7]:
    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):
List = [i for i in input().split()]
List.sort()
if List[0] == '5' and List[1] == '5' and List[2] == '7':
    print('YES')
else:
    print('NO')

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

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

Solution (Python):
print "YES" if [5, 5, 7] == sorted([int(x) for x in raw_input().split()]) else "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):
a, b, c = (int(i) for i in 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')

Solution (Python):



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

if A + B + C == 17:
    print("YES")
else:
    print("NO")

Solution (Python):
a = list(map(int,input().split()))
if sum(a) == 17:
  print("YES")
else:
  print("NO")

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

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

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

Solution (Python):
import sys

if __name__ == '__main__':
    X = list(map(int, sys.stdin.readline().split()))

    if X == [7, 5, 5] or X == [5, 7, 5] or X == [5, 5, 7]:
        print('YES')
    else:
        print('NO')

Solution (Python):
ans=list(map(int,input().split()))
dic={}
flg=0
for x in ans:
    if(x!=5 and x!=7):
        flg=-1
        break
    else:
        dic[str(x)]=dic.get(str(x),0)+1
if(flg==-1):
    print("NO")
else:
    if(dic["5"]!=2 or dic["7"]!=1):
	       print("NO")
    else:
 	      print("YES")

Solution (Python):
A=input()
print(['NO','YES'][(A.count('5')==2)*(A.count('7')==1)])

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

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

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

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

Solution (Python):
A,B,C = map(int,input().split())
print('YES' if A + B + C == 17 and (A + B == 10 or A + B ==12 ) else 'NO')

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

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

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

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

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

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

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

count = 0
for i in n:
    if int(i) == 5:
        count += 5
    elif int(i) == 7:
        count += 7

if count == 17:
    print("YES")
else:
    print("NO")

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

Solution (Python):
a, b, c = map(int,input().split())
sn = [a,b,c]
if sn.count(7)==1 and sn.count(5)==2:
    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,b,c = map(int, input().split())
if a*b*c == 5*7*5:
    print("YES")
else:
    print("NO")

Solution (Python):
from collections import Counter
numlist=Counter(input().split())
if numlist.most_common()[0][0]=="5" and numlist.most_common()[0][1]==2:
    if numlist.most_common()[1][0]=="7" and numlist.most_common()[1][1]==1:
       print("YES")
else:
    print("NO")

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

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

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

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

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

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

Solution (Python):
l = list(map(int, input().split()))
s = sum(l)
if(s == 17):
    if(l[0]==5 or l[0]==7):
        if(l[0]+ l[1] == 10 or l[0] +l[1] == 12):
            print("YES")
        else:
            print("NO")
    else:
        print("NO")
else:
    print("NO")

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

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

Solution (Python):
S = input()
count = 0
for i in S:
    if i == "5":
        count += 1
    if i == "7":
        count += 2
if count == 4:
        print("YES")
else:
    print("NO")

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

Solution (Python):
A = [int(a) for a in input().split()]

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

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

a = 0
b = 0
for i in range(len(l)):
  if (l[i] == 5):
    a = a + 1
  elif (l[i]) == 7:
    b = b + 1
  else:
    pass

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

Solution (Python):
if __name__ == '__main__':
    tokens = map(int, input().split(' '))
    five = 0
    seven = 0
    for t in tokens:
        if t == 5:
            five += 1
        if t == 7:
            seven += 1

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

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

a.sort()

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

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

a.sort()

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

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

a.sort()

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

Solution (Python):

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

ABC.sort()
if ABC == [5,5,7]:
    print("YES")
else:
    print("NO")

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

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

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

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

Solution (Python):



def f(data):
    for i in range(3):
        if 0 > int(data[i]) or int(data[i]) > 10:
            print("NO")
            return 0

    if int(data[0]) == 5:
        if int(data[1]) == 5:
            if int(data[2]) == 7: 
                print("YES")
            else:
                print("NO")
        elif int(data[1]) == 7:
            if int(data[2]) == 5: 
                print("YES")
            else:
                print("NO")
    elif int(data[0]) == 7:
        if int(data[1]) == 5:
            if int(data[2]) == 5: 
                print("YES")
            else:
                print("NO")
        else:
            print("NO")
    else:
        print("NO")

    return 0

data = input().split()
if len(data) == 3:
    f(data)
else:
    print("NO")

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

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

Solution (Python):
inputs = list(map(int, input().split()))
n5, n7 = 0, 0
flag = True

for e in inputs:
  if e == 5:
    n5 += 1
  elif e == 7:
    n7 += 1
  else:
    break
 
if flag and n5 == 2 and n7 == 1:
  print('YES')
else:
  print('NO')

Solution (Python):
inputs = list(map(int, input().split()))
n5, n7 = 0, 0
flag = True

for e in inputs:
  if e == 5:
    n5 += 1
  elif e == 7:
    n7 += 1
  else:
    break
 
if flag and n5 == 2 and n7 == 1:
  print('YES')
else:
  print('NO')

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

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

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

Solution (Python):


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

f=0
s=0

if a==5:
    f = f + 1
elif a == 7:
    s = s + 1
else:
    pass

if b==5:
    f = f + 1
elif b == 7:
    s = s + 1
else:
    pass

if c==5:
    f = f + 1
elif c == 7:
    s = s + 1
else:
    pass

if f==2 and s==1:
    print("YES")
else:
    print("NO")

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

Solution (Python):
a = input()
if a =="5 5 7" or a=="5 7 5" or a=="7 5 5":
    print("YES")
else:
    print("NO")

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

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

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

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

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

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

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

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

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

Solution (Python):
l = input().split()
a = 0
b = 0
for i in range(3):
    if l[i] == "5":
        a += 1
    if l[i] == "7":
        b += 1
print("YES" if a ==2 and b == 1 else "NO")

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

Solution (Python):
a,b,c = map(int,input().split())
mul = a*b*c
plus = a+b+c

if mul == 175 and plus == 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())
haiku_list=[A,B,C]
if haiku_list.count(5)==2 and haiku_list.count(7)==1:
    print ('YES')
else:
    print ('NO')

Solution (Python):
from collections import defaultdict

dd = defaultdict(int)
for i in input().split():
    dd[i] += 1

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

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

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

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

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

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

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

Solution (Python):
print('YES' if sorted(input()[::2]) == ['5','5','7'] else 'NO')

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

GO = 0
SHICHI = 0

for i in N:
    if i == 5: GO += 1
    elif i == 7: SHICHI += 1

if GO==2 and SHICHI==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):
L = list(map(int, input().split()))
five, seven = 0, 0

for x in L:
    if x == 5:
        five += 1
    if x == 7:
        seven += 1

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

Solution (Python):





if __name__ == '__main__':
    numbers = list(map(int, input().split()))

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

Solution (Python):
inpt = map(int, raw_input().split())
five = 0
seven = 0

for i in range(0, 3):
	if inpt[i] == 5: five = five + 1
	if inpt[i] == 7: seven = seven + 1

if five == 2 and seven == 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):
a = list(map(int,input().split()))
b = a.count(5)
c = a.count(7)
if b == 2 and c == 1:
    print('YES')
else:
    print('NO')

Solution (Python):


INPUT = input()

if sorted(map(int, INPUT.split())) == [5, 5, 7]:
    print('YES')
else:
    print('NO')

Solution (Python):
A = sorted(list(map(int,input().split())))
print("YES" if A == [5,5,7] 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):
a = list(map(int, input().split()))
if sum(a) == 17 and 5 in a and 7 in a:
    print('YES')
else:
    print('NO')

Solution (Python):

a,b,c = map(int,input().split())
if a+b+c==17:
    print("YES")
else:
    print("NO")

Solution (Python):
import sys
input_line  = sys.stdin.readline()
arr = input_line.rstrip().split(" ")

count5 = 0
count7 = 0

for i in arr:
    if int(i) == 5:
        count5 += 1
    if int(i) == 7:
        count7 += 1

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

Solution (Python):
import collections

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

c = collections.Counter(a)
if c.most_common()[0][0] == 5 and c.most_common()[0][1] == 2 and c.most_common()[1][0] == 7 and c.most_common()[1][1] == 1:
    print("YES")
else:
    print("NO")

Solution (Python):
if __name__ == '__main__':
    A, B, C = raw_input().split()
    c = 0
    if A == '7':
        c += 1
    if B == '7':
        c += 1
    if C == '7':
        c += 1
    if c == 1:
        print 'YES'
    else:
        print 'NO'

Solution (Python):
import sys
import io


def run(input: io.TextIOBase, output: io.TextIOBase):
    abc = input.readline().split()

    count_5 = 0
    count_7 = 0
    for x in abc:
        x = int(x)
        if x == 5:
            count_5 += 1
        if x == 7:
            count_7 += 1
    if count_5 == 2 and count_7 == 1:
        result = "YES"
    else:
        result = "NO"

    output.write(result + '\n')


if __name__ == '__main__':
    run(sys.stdin, sys.stdout)

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

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

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

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

Solution (Python):


def isOK(a):
    a = list(map(int, a.split()))
    comp = [5,5,7]
    for i,x in enumerate(sorted(a)):
        if x != comp[i]:
            return False
    return True

a = input()
if isOK(a):
    print('YES')
else:
    print('NO')

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

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

haiku = sorted(list(map(int, haiku)))

if [5, 5, 7] == haiku:
    print('YES')
else:
    print('NO')

Solution (Python):
import math
import sys

def getinputdata():

    
    array_result = []
    
    data = input()

    
    array_result.append(data.split(" "))

    flg = 1

    try:


        while flg:

            data = input()

            array_temp = []

            if(data != ""):
                
                array_result.append(data.split(" "))

                flg = 1

            else:

                flg = 0
    finally:


        return array_result





arr_data = getinputdata()

a = int(arr_data[0][0])
b = int(arr_data[0][1])
c = int(arr_data[0][2])

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")

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

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

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

A=num[0]
B=num[1]
C=num[2]

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

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

Solution (Python):
a,b,c=map(int,input().split())
s=[a,b,c]
d=s.count(5)
if d==2 and a+b+c==17:
  print("YES")
else:
  print("NO")

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

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

Solution (Python):
from itertools import permutations

if __name__ == '__main__':
    phrases = tuple(map(int, raw_input().split()))
    print 'YES' if phrases in permutations([5, 7, 5], 3) else 'NO'

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

Solution (Python):
S=[int(i) for i in input().split()]
if max(S)==7 and min(S)==5 and sum(S)==17:
  print("YES")
else:
  print("NO")

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

Solution (Python):
a = list(map(int,input().split()))
if 5 in a and 7 in a and sum(a) == 17:
    print("YES")
else:
    print("NO")

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

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

Solution (Python):
V = tuple([int(n) for n in input().split()])

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

Solution (Python):
import sys

debug_mode = True if len(sys.argv) > 1 and sys.argv[1] == "-d" else False
if debug_mode:
    import os
    inf = open(os.path.basename(__file__).replace(".py", ".in"))

    def input():
        return inf.readline()
else:
    inf = sys.stdin



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


solve()



if debug_mode:
    inf.close()

Solution (Python):
from collections import Counter
A = input().split()
A = Counter(A)
if A['5'] == 2 and A['7'] == 1:
    print('YES')
else:
    print('NO')

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

Solution (Python):

s=input()
print('YES' if s in '5 7 5 5 7' else 'NO')

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

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

Solution (Python):
arr = list(map(int, input().split()))
count_5 = 0
count_7 = 0
for i in arr:
    if i == 5:
        count_5 += 1
    if i == 7:
        count_7 += 1
if count_5 == 2 and count_7 == 1:
    print("YES")
else:
    print("NO")

Solution (Python):
lis = list(map(int, input().split()))
filtered_list_5 = list(filter(lambda x: x == 5, lis))
filtered_list_7 = list(filter(lambda x: x == 7, lis))
if len(filtered_list_5) == 2 and len(filtered_list_7) == 1:
    print('YES')
else:
    print('NO')

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

Solution (Python):
a,b,c=map(int,input().split())
seven=0
five=0
if(a==5):
  five+=1
elif(a==7):
  seven+=1
if(b==5):
  five+=1
elif(b==7):
  seven+=1
if(c==5):
  five+=1
elif(c==7):
  seven+=1
if(five==2 and seven==1):
  print("YES")
else:
  print("NO")

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

Solution (Python):
a=list(map(int,input().split()))
print(['NO','YES'][a.count(5)==2 and a.count(7)==1])

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

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


if __name__ == '__main__':
    main()

Solution (Python):
w = input()
l = list(w)
l.sort()
ans = str(l[2]) + str(l[3]) + str(l[4])
if ans == '557':
  print('YES')
else:
  print('NO')

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

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

Solution (Python):
arr = list(map(int,input().split()))
count_5 = 0
count_7 = 0 
for i in arr:
    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")

Solution (Python):

"""
https://beta.atcoder.jp/contests/abc042/tasks/abc042_a

"""
import sys
from sys import stdin
input = stdin.readline


def solve(data):
    ans = 'NO'
    data.sort()
    if data[0] == 5 and data[1] == 5 and data[2] == 7:
        ans = 'YES'
    return ans


def main(args):
    data = [int(x) for x in input().split()]
    ans = solve(data)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

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

go, nana = 0, 0

for i in a:
    if(i == 5):
        go += 1
    elif(i == 7):
        nana += 1

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

Solution (Python):
hoge = tuple(map(lambda x : int(x), input().split(" ")))

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

Solution (Python):
X = [int(i) for i in input().split()]
if sorted(X)==[5,5,7]:
  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):





def main():
    V = sorted(map(int, input().split()))
    ok = V == [5,5,7]
    print("YES" if ok else "NO")

if __name__ == "__main__": main()

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

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

Solution (Python):
a=list(map(int,input().split()))
print(['NO','YES'][a.count(5)==2 and a.count(7)==1])

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

Solution (Python):
a,b,c = map(int, input().split())
sum = [a, b, c]
if sum.count(5) == 2 and sum.count(7) == 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):
print('YES' if (lambda x: x[0] == 5 and x[1] == 5 and x[2] ==7)(sorted(map(int, input().split()))) else 'NO')

Solution (Python):
A,B,C = map(int,input().split())
D=[A,B,C]
D.remove(7)
if D == [5,5]:
    print("YES")
else:
    print("NO")

Solution (Python):
print(("NO","YES")["".join(sorted(input()))=="  557"])

Solution (Python):
import sys
nums = [i for i in map(int, sys.stdin.readline().split())]
nums.sort()
if nums[0] == 5 and nums[1] == 5 and nums[2] == 7:
    print('YES')
else:
    print('NO')

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

if lis.count(7) == 1 and lis.count(5) == 2:
	print("YES")

else:
	print("NO")

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

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

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

count_5 = 0
count_7 = 0

for num in args:
    
    if num == 5:
        count_5 += 1
    if num == 7:
        count_7 += 1




if count_5 == 2 and count_7 == 1:
    print('YES')
else:
    print('NO')

Solution (Python):
a = list(map(int,input().split()))
haiku_5 = 2
haiku_7 = 1

num_5 = a.count(5)
num_7 = a.count(7)

if(num_5 == haiku_5 and num_7 == haiku_7):
    print('YES')
else:
    print('NO')

Solution (Python):
x = list(map(int, input().split()))
if x.count(5) == 2 and x.count(7) == 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):
arr=map(int,raw_input().strip().split(' '))
if arr.count(5)==2 and arr.count(7) == 1: print 'YES'
else: print 'NO'

Solution (Python):
li = list(input().split())

if li.count("5") == 2 and li.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 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):
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):
ABC = list(map(int, input().split()))
ABC.sort()
if (ABC[0]==5) & (ABC[1]==5) & (ABC[2]==7):
    print("YES")
else:
    print("NO")

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

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

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

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