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(str,input().split())
s=a+b+c
if s.count("5")==2 and s.count("7")==1:
    print("YES")
else:
    print("NO")

Solution (Python):
print(["NO","YES"][eval(input().replace(" ","*"))==175])

Solution (Python):
print(["NO","YES"][eval(input().replace(" ","*"))==175])

Solution (Python):

A,B,C = map(str,input().split())
S = A+B+C
if S.count("5") ==2 and S.count("7") == 1:
  print("YES")
else:
  print("NO")

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

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

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

count_5 = 0
count_7 = 0


if a == 5:
	count_5 += 1
elif a == 7:
	count_7 += 1


if b == 5:
	count_5 += 1
elif b == 7:
	count_7 += 1


if c == 5:
	count_5 += 1
elif c == 7:
	count_7 += 1

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

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

Solution (Python):

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

ans1 = 0
ans2 = 0

for i in range(len(A)):
    if A[i] == 5:
        ans1 += 1
    if A[i] == 7:
        ans2 += 1

if ans1 == 2 and ans2 == 1:
    print('YES')
else:
    print('NO')

Solution (Python):
a,b,c=input().split()
w=[a,b,c]
e=w.count('5')
if '5' and '7' not in w:
    print ('NO')
elif e==2:
    print ('YES')
else:
    print ('NO')

Solution (Python):
n=list(map(int,input().split()))
b=[]
a=0
for i in n:
    if i ==5:
        a+=i
    elif i==7:
        a+=i
    else:
        print('NO')
if a == 17:
    print('YES')
else:
    print('NO')

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

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

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

Solution (Python):
import sys

def solve(a,b,c):
    li = [a,b,c]
    cf = 0
    cs = 0
    for i in li:
        if int(i) == 5:
            cf +=1
        if int(i) == 7:
            cs +=1
    if cf == 2 and cs ==1:
        return 'YES'
    else:
        return 'NO'
            
def readQuestion():
    line = sys.stdin.readline().rstrip()
    [str_a, str_b, str_c] = line.split(' ')
    return (int(str_a), int(str_b), int(str_c))

def main():
    a, b, c = readQuestion()
    answer = solve(a, b, c)
    print(answer)
    
if __name__ == '__main__':
    main()

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

Solution (Python):
a = input("")
if a.count("5") == 2 and a.count("7") == 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):
l = input().split()
if l.count('5')==2 and '7' in l:
  print('YES')
else:
  print('NO')

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

Solution (Python):
import itertools
a=input().split()

b=itertools.permutations('575')
b=list(b)
flag=0
for i in range(len(list(b))):
  c=b[i][0]+b[i][1]+b[i][2]

  if list(c)==a:
    flag=1
print('YES' if flag==1 else 'NO' )

Solution (Python):


import sys

def solve(a, b, c):
    if (a,b,c) == (5,5,7) or (a,b,c) == (5,7,5) or (a,b,c) == (7,5,5):
        print('YES')
    else:
        print('NO')

def readQuestion():
    ws = sys.stdin.readline().strip().split()
    a = int(ws[0])
    b = int(ws[1])
    c = int(ws[2])
    return (a, b, c,)

def main():
    solve(*readQuestion())


main()

Solution (Python):
A, B, C = [int(_) for _ in input().split()]
if A*B*C == 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):
z = input().split()

if z.count("5") == 2 and z.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):
ABC = map(int, raw_input().split())
print "NO" if sum(ABC) != 17 or (5 not in ABC and 7 not in ABC) else "YES"

Solution (Python):
input_1 = input()

cnt_5 = input_1.count("5")
cnt_7 = input_1.count("7")

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

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

Solution (Python):
import sys
import math
import collections
import itertools
import array
import inspect


sys.setrecursionlimit(1000000)



def chkprint(*args):
    names = {
        id(v): k
        for k, v in inspect.currentframe().f_back.f_locals.items()
    }
    print(', '.join(
        names.get(id(arg), '???') + ' = ' + repr(arg) for arg in args))



def to_bin(x):
    return bin(x)[2:]


def li_input():
    return [int(_) for _ in input().split()]


def gcd(n, m):
    if n % m == 0:
        return m
    else:
        return gcd(m, n % m)


def gcd_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = gcd(v, L[i])

    return v


def lcm(n, m):
    return (n * m) // gcd(n, m)


def lcm_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = lcm(v, L[i])

    return v



def wfs_d(D, N, K):
    """
    D: 隣接行列(距離付き)
    N: ノード数
    K: 始点ノード
    """

    dfk = [-1] * (N + 1)
    dfk[K] = 0

    cps = [(K, 0)]
    r = [False] * (N + 1)
    r[K] = True
    while len(cps) != 0:
        n_cps = []
        for cp, cd in cps:
            for i, dfcp in enumerate(D[cp]):
                if dfcp != -1 and not r[i]:
                    dfk[i] = cd + dfcp
                    n_cps.append((i, cd + dfcp))
                    r[i] = True

        cps = n_cps[:]

    return dfk



def dfs_d(v, pre, dist):
    """
    v:  現在のノード
    pre: １つ前のノード
    dist: 現在の距離

    以下は別途用意する
    D: 隣接リスト(行列ではない)
    D_dfs_d: dfs_d関数で用いる，始点ノードから見た距離リスト
    """

    global D
    global D_dfs_d

    D_dfs_d[v] = dist

    for next_v, d in D[v]:
        if next_v != pre:
            dfs_d(next_v, v, dist + d)

    return


def sigma(N):
    ans = 0
    for i in range(1, N + 1):
        ans += i
    return ans


def comb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2, r + 1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p - 1, r, p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def bisearch(L, target):
    low = 0
    high = len(L) - 1
    
    while low <= high:
        mid = (low + high) // 2
        guess = L[mid]
        if guess == target:
            return True
        elif guess < target:
            low = mid + 1
        elif guess > target:
            high = mid - 1
    if guess != target:
        return False



dp = None


def main():
    A = sorted(li_input())

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




main()

Solution (Python):
l = [int(i) for i in input().split() ]
if (l[0] * l[1] * l[2] == 175) :
	print("YES")
else :
	print("NO")

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

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

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

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

five = 0; seven = 0

for i in list:
    if i == 5:
        five += 1
    elif i == 7:
        seven += 1
    else:
        pass

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

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

number_list = [A, B, C]

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

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

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

Solution (Python):
a=input().strip().split(" ")

b=[int(i) for i in a]

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

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

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

Solution (Python):
X=input()
if X in ["5 5 7","5 7 5","7 5 5"]:
    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):
array = list(map(int, input().strip().split(' ')))
x=array.count(5)
y=array.count(7)
if x==2:
    if y==1:
        print("YES")
else:
    print("NO")

Solution (Python):

if input().rstrip() in ("5 5 7","5 7 5","7 5 5"):
    print("YES")
else:
    print("NO")

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

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

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


    else:
        return print("NO")

judge()

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

Solution (Python):
l=list(map(int,input().split()))
for num in l:
  if num not in [5,7]:
    print("NO")
    exit()
if sum(l) == 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:
    if abs(B-C)==2:
      print("YES")
    else:
      print("NO")
  elif A==7:
    if B==C:
      print("YES")
    else:
      print("NO")
  else:
    print("NO")
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):
s = input().split()

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

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

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

Solution (Python):
s = ''.join(sorted(input()))
if s == '  557':
  print('YES')
else:
  print('NO')

Solution (Python):
print('YNEOS'['7 7'in input()::2])

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

Solution (Python):
A,B,C=[int(x) for x in 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==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):
lis = list(map(int,input().split()))

if sum(lis) == 17 and 5 in lis and 7 in lis:
  print("YES")
else:
  print("NO")

Solution (Python):


a_b_c = list(map(int, input().split()))
tmp = [5, 7, 5]
flag = True

for i in a_b_c:
    if i in tmp:
        tmp.remove(i)
    else:
        print('NO')
        flag = False
        break

if flag:
    print('YES')

Solution (Python):

def main():
    buf = input()
    buflist = buf.split()
    A = int(buflist[0])
    B = int(buflist[1])
    C = int(buflist[2])
    len_list = list(sorted([A,B,C]))
    if len_list == [5,5,7]:
        print("YES")
    else:
        print("NO")

if __name__ == '__main__':
    main()

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

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

    c5 = li.count(5)
    c7 = li.count(7)

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


if __name__ == '__main__':
    main()

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


if x == [5 ,5 ,7]:
    print('YES')
elif x == [5, 7 ,5]:
    print('YES')
elif x == [7, 5, 5]:
    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())
if (A != 5 and A!=7):
	print('NO')
if (B != 5 and B!=7):
	print('NO')
if (C != 5 and C!=7):
	print('NO')
if(A + B + C != 17):
	print('NO')
else:
	print('YES')

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

Solution (Python):
A, B, C = map(int,input().split())
co = [A, B, C]
co.sort()

if (co[0] == 5) and (co[1] == 5) and (co[2] == 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):
data = input().split()


def main(data):
    five_num = data.count("5")
    seven_num = data.count("7")
    if five_num == 2 and seven_num == 1:
        print("YES")
    else:
        print("NO")


if __name__ == "__main__":
    main(data)

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:
    print('NO')
elif list[1] != 5:
    print('NO')
elif list[2] != 7:
    print('NO')
else:
    print('YES')

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

if A+B+C == 17 and A*B*C == 175:
    print('YES')
else:
    print('NO')

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

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

Solution (Python):
def main():
    A, B, C = map(int, input().split())
    count5 = 0
    count7 = 0
    if A == 5:
        count5 += 1
    elif A == 7:
        count7 += 1

    if B == 5:
        count5 += 1
    elif B == 7:
        count7 += 1

    if C == 5:
        count5 += 1
    elif C == 7:
        count7 += 1

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


if __name__ == "__main__":
    main()

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

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

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

Solution (Python):

from sys import stdin

s = sorted([int(x) for x in stdin.readline().rstrip().split()])
if s == [5,5,7]:
    print("YES")
else:
    print("NO")

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

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

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

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

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

Solution (Python):


"""
    3 つの文節の長さを表す整数 A,B,C が与えられるので、
    それらの文節を並び替えて五七五にできるか判定してください。

    入力: A B C
    出力: YES / NO
"""


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

list_ABC = [A, B, C]
test_mode = False

if test_mode is True:
    print(list_ABC)


def haiku_TF(x):
    """
    575ができるか判定
    """
    if x in ([5, 7, 5], [7, 5, 5], [5, 5, 7]):
        return True
    return False


if haiku_TF(list_ABC):
    print('YES')
else:
    print('NO')

Solution (Python):
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


def main():
    C = Counter(list(map(int, input().split())))
    if C[5] == 2 and C[7] == 1:
        print(YES)
    else:
        print(NO)


if __name__ == '__main__':
    main()

Solution (Python):
x,y,z=map(int,input().split())
if (x==y==5 and z==7) or (y==z==5 and x==7) or (z==x==5 and y==7):
    print("YES")
else:
    print("NO")

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

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

Solution (Python):
a = list(map(int, input().split()))
five_count = a.count(5)
seven_count = a.count(7)

if five_count == 2 and seven_count == 1:
    print("YES")
else:
    print("NO")

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

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

Solution (Python):
print("YNEOS"[eval(input().replace(" ","*"))!=175::2])

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

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

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

Solution (Python):

print(["NO", "YES"][sorted(input()) == [" ", " ", "5","5","7"]])

Solution (Python):

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

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

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

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

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

if sum(log)==17 and 5 in log and 7 in log:
    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())
list = list((a,b,c))
list.sort()
if list == [5,5,7]:
  print("YES")
else:
  print("NO")

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

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

Solution (Python):
A = list(input())

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

Solution (Python):
A = input()

if A.count('5') == 2 and A.count('7') == 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 = list(map(int,input().split()))

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

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

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

cnt5 = line.count("5")
cnt7 = line.count("7")

if cnt5 == 2 and cnt7 == 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()))
a.sort()
if a == [5,5,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 = input().split()
b = ['5', '7', '5']

f = True
for i in a:
    if i in b:
        b.remove(i)
    else:
        f = False
        break

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

Solution (Python):
def solve(xs):
  if xs.count(5) == 2 and xs.count(7) == 1:
    print('YES')
  else:
    print('NO')

solve([ int(_) for _ in input().split() ])

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

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

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

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

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

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

Solution (Python):
inputs = input().split()
print('YES' if inputs.count('5') == 2 and inputs.count('7') == 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):
from collections import Counter

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

c = Counter([A, B, C])
if c[5] == 2 and c[7] == 1:
    print('YES')
else:
    print('NO')

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

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 = (int(i) for i in input().split())
if a == 7 or b == 7 or c == 7:
    if (a == 5 and b == 5) or (b == 5 and c == 5) or (a == 5 and c == 5):
        print('YES')
        exit()
    else:
        print('NO')
        exit()
else:
    print('NO')
    exit()

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 == 5 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=sorted(list(input().split()))
print(['NO','YES'][A.count('5')==2and A.count('7')])

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

Solution (Python):
print("YNEOS"[eval(input().replace(' ','+'))!=17::2])

Solution (Python):
a,b,c=map(int,input().split());print("YNEOS"[a+b+c!=17or a^b^c!=7::2])

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

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

Solution (Python):
def rythm_check(abc):
    sum = 0
    for i in abc.split():
        num = int(i)
        if num == 5 or num == 7:
            sum += num
        else:
            return 'NO'

    if sum == 17:
        return 'YES'
    else:
        return 'NO'

abc = input()
print (rythm_check(abc))

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

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

Solution (Python):


l = input().split()
count5 = 0

if len([s for s in l if '5' in s]) == 2 and len([s for s in l if '7' in s]) == 1:
    print("YES")
else:
    print("NO")

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

Solution (Python):
n = input()
if n.count('5')==2:
  print(' YNEOS'[n.count('7')::2])
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):
print(' YNEOS'[input().count('7')::2])

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

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

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

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):
l = [int(_) for _ in input().split()]
print('YES') if l.count(5) == 2 and l.count(7) == 1 else print('NO')

Solution (Python):


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

if __name__ == '__main__':
    main()

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

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

Solution (Python):

l = sorted(input().split())
print('YES' if l==['5','5','7'] else 'NO')

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

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

Solution (Python):
a = list(input().split(" "))

a.sort(reverse=True)
if a[0] =='7' and a[1]=='5'and a[2] == '5':
    print("YES")
else:
    print("NO")

Solution (Python):
a = map(int,input().split(" "))
cnt5=0
cnt7=0
for n in a:
    if(n==5):
        cnt5+=1
    if(n==7):
        cnt7+=1
if(cnt5==2 and cnt7 == 1):
    print("YES")
else:
    print("NO")

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

Solution (Python):
A, B, C = map(int, input().split()) 
numbers = [A, B, C] 
numbers.sort()
a = numbers[0]
b = numbers[1]
c = numbers[2]

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

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

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

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

Solution (Python):

def main():
    n =list(map(int,input().split()))

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

if __name__ == "__main__":
        main()

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

Solution (Python):

def main():
    n =list(map(int,input().split()))

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

if __name__ == "__main__":
        main()

Solution (Python):
from collections import Counter
print("YES" if Counter(input().split()) == Counter('575') else "NO")

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

Solution (Python):
t = input().split(" ")

a = 0
b = 0
for i in t:
  if int(i) == 7:
    a += 1
  elif int(i) == 5:
    b += 1
if a == 1 and b == 2:
  print("YES")
else:
  print("NO")

Solution (Python):
d = list(map(int, input().split()))
if sorted(d) == [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())
l = [A, B, C]
if l.count(5)==2 and l.count(7)==1:
    print('YES')
else:
    print('NO')

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

l = sorted(l)

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

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

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

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

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

Solution (Python):
num,num_two,num_three = map(int,input().split())
lis = [num,num_two,num_three]
print("YES" if lis.count(5) == 2 and lis.count(7) == 1 else "NO")