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):
a,b,c=map(int,input().split())
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==c==5):
    print("YES")
  else:
    print("NO")
else:
  print("NO")

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

Solution (Python):
s=list(input().split())
s.sort()
print("YES" if "".join(s)=="557" else "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):
ABC = list(map(int, input().split()))
print('YNEOS'[not (ABC.count(5) == 2 and ABC.count(7) == 1)::2])

Solution (Python):
a,b,c=sorted(input().split());print('YES'if a+b+c=='557'else'NO')

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

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

Solution (Python):
n = list(map(int, input().split()))
count_5 = 2
count_7 = 1
for i in range(len(n)):
    if n[i] == 5:
        count_5 -= 1
    elif n[i] == 7:
        count_7 -= 1
if count_5==0 and count_7==0:
    print('YES')
else:
    print('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 = sorted(map(int, input().split()))
print("YES" if a==b==5 and c ==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,b,c = sorted(map(int, input().split()))
print("YES" if a==b==5 and c ==7 else "NO")

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

Solution (Python):
x = list(map(int, input().split()))
a = 0
for i in x:
        if i != 5 and i != 7:
                a = 1
        break
if a == 0:
        if sum(x) == 17:
                print('YES')
        else:
                print('NO')
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=sum(list(map(int,input().split())))
if n==17:
  print("YES")
else:
  print("NO")

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

Solution (Python):
from collections import defaultdict
strings = raw_input().split()

cand = {
    '5': 2,
    '7': 1
}
source = defaultdict(int)
for i in range(len(strings)):
    if strings[i] == '5':
        if source[strings[i]]:
            source[strings[i]] += 1
        else:
            source[strings[i]] = 1
    elif strings[i] == '7':
        if source[strings[i]]:
            source[strings[i]] += 1
        else:
            source[strings[i]] = 1
if source == cand:
    print "YES"
else:
    print "NO"

Solution (Python):
A = sorted(map(int, input().split()))
B=[5,5,7]

if A==B:
    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):
abc = list(map(int, input().split()))
abc.sort()
if abc == [5, 5, 7]:
    print("YES")
else:
    print("NO")

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

Solution (Python):
five = 0
seven = 0

for i in input().split():
  if int(i) == 5:
    five += 1
  elif int(i) == 7:
    seven += 1
    
if (five == 2) and (seven == 1):
  print('YES')
else:
  print('NO')

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

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

Solution (Python):
from collections import Counter
A = Counter(map(int, input().split()))

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

Solution (Python):
lis = list(map(int,input().split()))
lis.sort()
if lis == [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):
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 b == 5 and c==7) or (a==7 and b == 5 and c == 5) or (a==5 and b == 7 and c==5):
  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):
a,b,c=map(int,input().split())
if a*b*c==5*7*5 and a+b+c==5+7+5:
    print("YES")
else:
    print("NO")

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

Solution (Python):
import collections
a = collections.Counter(list(map(int, input().split()))).items()
for k, v in a:
    if (k != 5 or v != 2) and (k != 7 or v != 1):
        print("NO")
        exit()
print("YES")

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

Solution (Python):
li = list(map(int,input().split()))
li.sort()
if li[:]==[5,5,7]:
    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):


s = input().split(" ")

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

Solution (Python):
arr = input().split()
print("YES" if(arr.count("5") == 2 and arr.count("7") == 1) 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):

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

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

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

Solution (Python):
import sys
input=sys.stdin.readline

l = list(map(int, input().split()))
l.sort()

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

Solution (Python):


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

five_count = 0
seven_count = 0

def setsu_check(x):
	global five_count, seven_count
	if x == 5:
		five_count+=1
	elif x == 7:
		seven_count+=1

setsu_check(a)
setsu_check(b)
setsu_check(c)
if five_count == 2 and seven_count == 1:
	print("YES")
else:
	print("NO")

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

Solution (Python):
n = list(map(int, input().split()))
n = sorted(n)
if n == [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) 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 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):
a, b, c = map(int, input().split())
print("YES" if (a == b == 5 and c == 7) or (b == c == 5 and a == 7) or (a == c == 5 and b == 7) else "NO")

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

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

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

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

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

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

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

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

Solution (Python):
count_5 = 0
count_7 = 0
for s in input().split():
    if s == '5':
        count_5 += 1
    if s == '7':
        count_7 += 1
if count_5 == 2 and count_7 == 1:
    print('YES')
else:
    print('NO')

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

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

Solution (Python):


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

Solution (Python):

a = input().split()

a.sort()

b = ['5', '5', '7']

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

Solution (Python):


import numpy as np

if __name__ == "__main__":
    
    input_str = input("")
    
    length_str = np.array([int(f) for f in input_str.split(" ")])
    
    if np.sum(length_str == 5) == 2 and np.sum(length_str == 7) == 1:
        print("YES")
    else:
        print("NO")

Solution (Python):
A = sorted(int(x) for x in input().split())
if A[0] == A[1] == 5 and A[2] == 7:
  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) != 17:
  print("NO")
elif(a + b + c) == 17:
    if(a + b == 10) | (b + c == 10) | (c + a == 10):
      print("YES")
    else:
      print("NO")
else:
  print("NO")

Solution (Python):
S = list(map(int,input().split()))
count5 = 0
count7 = 0
for i in range(3):
    if S[i] == 5:
        count5 += 1
    elif S[i] == 7:
        count7 += 1
if count5 ==2 and count7 == 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 print("NO")

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

Solution (Python):

ABC_str = input()
ABC_list = ABC_str.split(' ')
ABC_list.sort()
if ABC_list[0] == '5' and ABC_list[1] == '5' and ABC_list[2] == '7':
    print('{}'.format('YES'))
else:
    print('{}'.format('NO'))

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

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

Solution (Python):
def k(a,i1,i2):
  if(a==7):
    i1 = i1+1
  if(a==5):
    i2 = i2+1
  return i1,i2
  
a,b,c=map(int,input().split())
i1=0
i2=0
i1,i2 = k(a,i1,i2)
i1,i2 = k(b,i1,i2)
i1,i2 = k(c,i1,i2)
print('YES' if i1==1 and i2==2 else 'NO')

Solution (Python):
import sys

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

if sorted(args) == [5, 5, 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):
abc = input()

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

Solution (Python):
ABC = list(map(int,input().split()))
ans = 'NO'
count_5 = 0
count_7 = 0

for abc in ABC:
    if abc==5:
        count_5 += 1
    elif abc==7:
        count_7 += 1
if count_5==2 and count_7==1:
    ans = 'YES'
print(ans)

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):
l = list(map(int,input().split()))

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

else:
    print('NO')

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

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

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

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

Solution (Python):

import sys
sys.setrecursionlimit(300000)
YES = "YES"  
NO = "NO"  
def solve(A: int, B: int, C: int):
    ret = NO
    if min(A, B, C) == 5 and max(A, B, C) == 7 and sum([A, B, C]) == 17:
        ret = YES
    print(ret)
    return
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  
    B = int(next(tokens))  
    C = int(next(tokens))  
    solve(A, B, C)
if __name__ == '__main__':
    main()

Solution (Python):

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

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

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

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

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

Solution (Python):

p_length = input().split()

if p_length.count("7") == 1 and p_length.count("5") == 2:
    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()))
A.sort()
if A == [5,5,7]:
  print("YES")
else:
  print("NO")

Solution (Python):
A,B,C=map(int,input().split())
a=str(A)
b=str(B)
c=str(C) 
s=a+b+c
if s.count("5")==2 and s.count("7")==1:
    print("YES")
else:
    print("NO")

Solution (Python):
[a,b,c]=map(int, input().split())
list1=[a,b,c]
list1.sort()
if list1==[5,5,7]:
	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, b, c = map(int, input().split())
if sorted((a, b, c)) == [5, 5, 7]:
  print('YES')
else:
  print('NO')

Solution (Python):
cnt5 = 0
cnt7 = 0

def check57(m):
    global cnt5
    global cnt7
    if m == 5:
        cnt5 += 1
    elif m == 7:
        cnt7 += 1

a, b, c = map(int, raw_input().split())
check57(a)
check57(b)
check57(c)
if cnt5 == 2 and cnt7 == 1:
    print "YES"
else:
    print "NO"

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

ans = [5, 5, 7]

if ans == a:
    print("YES")
else:
    print("NO")

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

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

Solution (Python):
A,B,C=list(map(int, input().split()))
haiku=[A,B,C]
five=haiku.count(5)
seven=haiku.count(7)

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

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

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

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

Solution (Python):
s=list(map(int,input().split()))
fivecon=0
sevencon=0
for i in range(3):
  if s[i]==5:
    fivecon+=1
  elif s[i]==7:
    sevencon+=1
    
if fivecon==2 and sevencon==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):
from copy import deepcopy
from sys import exit,setrecursionlimit
import math
from collections import defaultdict,Counter,deque
from fractions import Fraction as frac

setrecursionlimit(1000000)


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

def zip(a):
	mae = a[0]
	ziparray = [mae]
	for i in range(1,len(a)):
		if(mae != a[i]):
			ziparray.append(a[i])
			mae = a[i]
	return ziparray

def is_prime(n):
	if n < 2: return False

	for k in range(2, int(math.sqrt(n)) + 1):
		if n % k == 0:
			return False

	return True

def list_replace(n,f,t):
	return [t if i==f else i for i in n]

def base_10_to_n(X, n):
	X_dumy = X
	out = ''
	while X_dumy>0:
		out = str(X_dumy%n)+out
		X_dumy = int(X_dumy/n)
	if(out == ''): return '0'
	return out

def gcd(l):
	x = l.pop()
	y = l.pop()
	while(x%y!=0):
		z = x%y
		x = y
		y = z
	l.append(min(x,y))
	return gcd(l) if len(l) > 1 else l[0]

class Queue():
	def __init__(self):
		self.q = deque([])
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.popleft()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class Stack():
	def __init__(self):
		self.q = []
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.pop()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class graph():
	def __init__(self):
		self.graph = defaultdict(list)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
		self.graph[t].append(f)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
		self.graph[t].remove(f)
	def linked(self,f):
		return self.graph[f]

class dgraph():
	def __init__(self):
		self.graph = defaultdict(set)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
	def linked(self,f):
		return self.graph[f]

main()

Solution (Python):
from copy import deepcopy
from sys import exit,setrecursionlimit
import math
from collections import defaultdict,Counter,deque
from fractions import Fraction as frac

setrecursionlimit(1000000)


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

def zip(a):
	mae = a[0]
	ziparray = [mae]
	for i in range(1,len(a)):
		if(mae != a[i]):
			ziparray.append(a[i])
			mae = a[i]
	return ziparray

def is_prime(n):
	if n < 2: return False

	for k in range(2, int(math.sqrt(n)) + 1):
		if n % k == 0:
			return False

	return True

def list_replace(n,f,t):
	return [t if i==f else i for i in n]

def base_10_to_n(X, n):
	X_dumy = X
	out = ''
	while X_dumy>0:
		out = str(X_dumy%n)+out
		X_dumy = int(X_dumy/n)
	if(out == ''): return '0'
	return out

def gcd(l):
	x = l.pop()
	y = l.pop()
	while(x%y!=0):
		z = x%y
		x = y
		y = z
	l.append(min(x,y))
	return gcd(l) if len(l) > 1 else l[0]

class Queue():
	def __init__(self):
		self.q = deque([])
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.popleft()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class Stack():
	def __init__(self):
		self.q = []
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.pop()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class graph():
	def __init__(self):
		self.graph = defaultdict(list)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
		self.graph[t].append(f)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
		self.graph[t].remove(f)
	def linked(self,f):
		return self.graph[f]

class dgraph():
	def __init__(self):
		self.graph = defaultdict(set)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
	def linked(self,f):
		return self.graph[f]

main()

Solution (Python):

def main():
    data = input()
    if data in ['5 7 5', '5 5 7', '7 5 5']:
        print('YES')
    else:
        print('NO')


if __name__ == '__main__':
    main()

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

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

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

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

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

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

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

Solution (Python):
x=input()

if x.count("7") == 1:
  if x.count("5") == 2:
    print("YES")
    exit(0)
    
print("NO")

Solution (Python):
a,b,c = map(int,input().split())
if a == 5 and b == 7 and c ==5:
    print('YES')
elif a == 5 and b == 5 and c == 7:
    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:
    if s.count('5') == 2:
        print('YES')

        exit(0)

print('NO')

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

Solution (Python):

S = input()
S0 = int(S[0])
S1 = int(S[2])
S2 = int(S[4])
if (S0*S1*S2)%(5*7*5)==0:
    print("YES")
else :
    print("NO")

Solution (Python):
x = list(input().split())
if x.count('5')==2 and x.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):
numlist = list(map(int,input().split()))
if max(numlist) == 7 and min(numlist) == 5 and sum(numlist) == 17:
  print('YES')
else:
  print('NO')

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

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

Solution (Python):

"""
Created on Fri Jul 26 03:56:38 2019

@author: matsui
"""

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

L=[A,B,C]
if 7 in L:
    L.remove(7)
    if L == [5,5]:
        ans=True
if ans:
    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

abc = [int(x) for x in sys.stdin.readline().split()]
abc.sort()
if abc == [5, 5, 7]:
    print("YES")
else:
    print("NO")

Solution (Python):
n = input().split()
result = 'NO'
if n.count('5') == 2 and n.count('7') == 1:
  result = 'YES'
print("{}".format(result))

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

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

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

Solution (Python):

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

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

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

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

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

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

if 5 in lst and 7 in lst and sum(lst) == 17:
  print('YES')
else:
  print('NO')

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

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

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

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

a, b , c = MAP()
if a + b + c == 17:
    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):
a, b, c = map(int, input().split())
if a+b+c ==17:
    if a ==5 and b ==7:
        print("YES")
    elif a ==7 and b ==5:
        print("YES")
    elif a ==5 and b ==5:
        print("YES")
    else: 
        print("NO")
else:
    print("NO")

Solution (Python):
a, b, c = input().split()
abc = sorted([a, b, c])
ans = 'NO'
if abc[0] == '5' and abc[1] == '5' and abc[2] == '7':
  ans = 'YES'
print(ans)

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

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

Solution (Python):

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

dic = {}

dic[5] = 0
dic[7] = 0

for i in ABC:

    if i == 5 or i == 7:

        dic[i] += 1

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

Solution (Python):


tmp = input().split()
hoge = list(map(lambda a: int(a), tmp))

numf=0
nums=0
for i in range(0,3):
	if hoge[i]==5:
		numf +=1
	if hoge[i]==7:
		nums +=1

if (numf == 2) and (nums==1):
	print("YES")
else:
	print("NO")

Solution (Python):
input = input().split()
count = 0
for num in input:
  if num == "7":
    count += 1
 
if count == 1:
  print("YES")
else:
  print("NO")

Solution (Python):


input_list = input().split()

cnt7 = 0
cnt5 = 0

for n in input_list:
    if int(n) == 7:
        cnt7 += 1
    elif int(n) == 5:
        cnt5 += 1
    else:
        continue
if cnt7 == 1 and cnt5 == 2:
    print("YES")
else:
    print("NO")

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

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

cnt = 0
for i in A:
  if i != 7 and i !=5:
  	cnt = 5
  elif i == 7:
    cnt += 1

if cnt == 1:
  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):
s = input().split()

count5 = 0
count7 = 0
 
if s[0] == "5":
    count5 = count5 + 1
if s[0] == "7":
    count7 = count7 + 1
if s[1] == "5":
    count5 = count5 + 1
if s[1] == "7":
    count7 = count7 + 1
if s[2] == "5":
    count5 = count5 + 1
if s[2] == "7":
    count7 = count7 + 1
    
if count5 == 2 and count7 == 1:
    print("YES")
else:
    print("NO")

Solution (Python):
a = ["5","5","7"]
b = list(str(input()).replace(" ",""))
b.sort()
print("YES") if a==b else print("NO")

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

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

Solution (Python):


def main():
    A = list( map( int, input().split()))
    C = [0]*11
    for a in A:
        C[a] += 1
    if C[5] == 2 and C[7] == 1:
        print("YES")
    else:
        print("NO")
if __name__ == '__main__':
    main()

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