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

import sys
sys.setrecursionlimit(10**8)
INF = float("inf")


def yes():
    print("YES")  


def no():
    print("NO")  


def solve(A: int, B: int, C: int):
    if [5, 5, 7] == sorted([A, B, C]):
        yes()
    else:
        no()
    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):
a,b,c=map(int,raw_input().split())
if a+b+c==17:
  print "YES"
else:
  print "NO"

Solution (Python):
a,b,c = map(int,(input().split()))
num = []
num +=[a,b,c]

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

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

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

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

x = l.count("5")
y = l.count("7")

if(x==2 and y==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):
A = list(map(int,input().split()))

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

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

a = A.count('5')
b = A.count('7')

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

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

Solution (Python):
a = [int(x) for x in 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())
list = [A, B, C]
list.sort()

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

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

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

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

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

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

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

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

for i in range(3):
  if s[i] == 5:
    fifcount += 1
  elif s[i] == 7:
    sevcount += 1
if fifcount ==2 and sevcount ==1:

  print("YES")
else:
  print("NO")

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

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

Solution (Python):


from queue import Queue
from queue import LifoQueue as Stack
from math import sqrt, floor, ceil, log2
from fractions import gcd
from itertools import permutations, combinations
from operator import itemgetter
from functools import cmp_to_key



__MOD__=(10**9)+7
yn = 'YNEOS'
judge = False
cnt = 0
ans = None


def lcm(a, b):
    return (a*b) // gcd(a,b)

def intinput():
    return int(input())

def mulinputs():
    return map(int,input().split())

def lineinputs(func=intinput):
    datas = []
    while True:
        try:
            datas.append(func())
        except EOFError:
            break
    return datas

class ModInt():
    def __init__(self, x):
        self.__x = (x % __MOD__)
    def __add__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((self.__x + other.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((self.__x + other.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")
    def __sub__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((self.__x - other.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((self.__x - other.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")
    def __mul__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((self.__x * other.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((self.__x * other.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")
    def __truediv__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((self.__x * other.__modinv())%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((self.__x * other.__modinv())%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")
    def __pow__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__(pow(self.__x, other.__x, __MOD__)))
        elif type(other) == ModInt:
            return self.__class__(pow(self.__x, other.__x, __MOD__))
        else:
            raise Exception("Not Int or Not ModInt")
    def __modinv(self, m=__MOD__):
        a = self.__x
        if a == 0:
            raise ZeroDivisionError()
        if gcd(a, m) != 1:
            raise Exception("%sの逆数は求まりません。" % a)
        b, u, v = m, 1, 0
        while b != 0:
            t = a//b;
            a -= t*b
            a, b = b, a
            u -= t * v
            u, v = v, u
        u %= m
        if u < 0:
            u += m
        return u
    def __int__(self):
        return self.__x



if __name__ == '__main__':
    A, B, C = mulinputs()

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

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

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

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

Solution (Python):
abc =input()
five = abc.count("5")
seven = abc.count("7")

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

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

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

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

if c[5] == 2 and c[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):
input = list(map(int, input().split()))
go = 0
siti = 0
for v in input:
  if v == 5:
    go += 1
  elif v == 7:
    siti += 1

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

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

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

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

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

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

ans="NO"
if A+B+C==17:
  if min(A,B,C)==5:
    if max(A,B,C)==7:
      ans="YES"

print(ans)

Solution (Python):
s = [int(i) for i in input().split(' ')]
 
n = [0] * 2
 
for i in s:
    if i == 5:
        n[0] += 1
    elif i == 7:
        n[1] += 1
 
if n[0] == 2 and n[1] == 1:
    print('YES')
else:
    print('NO')

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

n = [0] * 5

for i in s:
    if i == 5:
        n[0] += 1
    elif i == 7:
        n[1] += 1

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

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

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

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

flag_5 = 0
flag_7 = 0

if len(inp) == 3:
    for i in range(3):
        if inp[i] == 5:
            flag_5 += 1
        elif inp[i] == 7:
            flag_7 += 1
        else :
            break

if flag_5 == 2 and flag_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):
cand=[(5,5,7),(5,7,5),(7,5,5)]
X=tuple(map(int,input().split()))
print("YES") if X in cand else print("NO")

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

f = 2
s = 1
flg = 1
for i in range(len(haiku)):
    if haiku[i] == 5:
        f -= 1
    elif haiku[i] == 7:
        s -= 1
    else:
        flg = 0
        break

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

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

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

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

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

Solution (Python):
"""
kari1 = '7 7 5'
in1 = kari1.split()
"""
in1 = input().split()

sujiCNT = [0] * 10

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

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

Solution (Python):
A=list(map(int,input().split()))
ans=sorted(A)
if ans==[5,5,7]:
  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):
s = input().split()
fiveCNT = 0
sevenCNT = 0
if s[0] == '5':
    fiveCNT = fiveCNT + 1
elif s[0] == '7':
    sevenCNT = sevenCNT + 1
if s[1] == '5':
    fiveCNT = fiveCNT + 1
elif s[1] == '7':
    sevenCNT = sevenCNT + 1
if s[2] == '5':
    fiveCNT = fiveCNT + 1
elif s[2] == '7':
    sevenCNT = sevenCNT + 1
if fiveCNT == 2 and sevenCNT == 1:
    print('YES')
else:
    print('NO')

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

Solution (Python):
a,b,c=map(int,input().split())
arr=[0]*100
arr[a]+=1
arr[b]+=1
arr[c]+=1

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

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

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    a,b,c=MI()
    L=[a,b,c]
    L.sort()
    if L==[5,5,7]:
        print("YES")
    else:
        print("NO")
    

main()

Solution (Python):
line = input()
if line.count("5")==2 and line.count("7")==1:
    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):
stack = [i for i in input().split(" ")]
cnt1 = 0
cnt2 = 0

for i in stack:
    if "5" == i:
        cnt1 = cnt1 + 1
    if "7" == i:
        cnt2 = cnt2 + 1

if cnt1 == 2 and cnt2 == 1:
    print("YES")
else:
    print("NO")

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

Solution (Python):
l = list(input().split())
five = 0
seven = 0
for i in l:
  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):
num = [x for x in input().split() ]
count5 = num.count("5")
count7 = num.count("7")
if count5 == 2 and count7 == 1:
  print("YES")
else:
  print("NO")

Solution (Python):
from sys import stdin

l = stdin.readline().rstrip().split()
l.sort()

a, b, c = [int(x) for x in l]

if a == b == 5:
    if c == 7:
        print('YES', flush=True)
    else:
        print('NO', flush=True)
else:
    print('NO', flush=True)

Solution (Python):
print(" YNEOS"[(input() in ["5 5 7", "5 7 5", "7 5 5"])::2].strip())

Solution (Python):
a = input().split()
five = 0
seven = 0
for i in a:
    if i == "5":
        five += 1
    elif i == "7":
        seven += 1
if five == 2 and seven == 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):
a, b, c = map(int, input().split())

list_iroha = [a, b, c]
count = 0
if a + b + c == 17:
    for i in list_iroha:
        if i == 5:
            count += 1
            if count == 2:
                print("YES")
                exit()
print("NO")
exit()

Solution (Python):
x = 1
for a in input().split():
  x *= int(a)
if x == 175:
  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):
array = list(map(int, (input().split())))

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

Solution (Python):
a, b , c = map(int, input().split())
flag = a*b*c==175 and a+b+c==17 
print('YES' if flag else '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):
x, y, z =  map(int, input().split())

if x + y + z == 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 a ==c==5 and b ==7:
    print('YES')
elif b==c==5 and a ==7:
    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):
data=input().rstrip().split()
num = [int(x) for x in data]
if 5 in num and 7 in num and sum(num)==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 a==c==5 and b==7:
    print("YES")

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

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

five = [w for w in user_input if w == 5]
seven = [w for w in user_input if w == 7]

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

Solution (Python):
import sys
readline = sys.stdin.buffer.readline
a,b,c = map(int,readline().split())

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

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

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

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

Solution (Python):
import sys
 
a,b,c = map(int,input().split())
 
if 7 in [a,b,c]:
	if len(list(filter(lambda x:x ==5,[a,b,c]))) is 2:
		print("YES")
		sys.exit()
 
print("NO")

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

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

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

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


u = sorted(t)


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

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

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

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

Solution (Python):
abc = list(map(int,input().split()))
haiku = [5,7,5]

for i in range(3):
    if haiku[i] in abc:
        abc.remove(haiku[i])
    else:
        print("NO")
        break
else:
    print("YES")

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

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

Solution (Python):
a, b, c = map(int, input().split())
s = str(a) + str(b) + str(c)
if s == "557":
  print("YES")
elif s == "575":
  print("YES")
elif s == "755":
  print("YES")
else:
  print("NO")

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

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

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

Solution (Python):

ans = 'NO'

lst = list(input().split())
if lst.count('5') == 2:
    if lst.count('7') == 1:
        ans = 'YES'

print(ans)

Solution (Python):
a=''.join(sorted(map(str,input().split())))
print('YES' if a=='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):
s = input()
if s.count('5') == 2 and s.count('7') == 1:
  print('YES')
else:
  print('NO')

Solution (Python):

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

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

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

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

Solution (Python):
a=list(map(int,input().split()))
if a==[5,5,7] or a==[5,7,5] or a==[7,5,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,b,c=map(int,input().split())
d=min(a,b,c)
e=max(a,b,c)
if d==5 and e==7 and a+b+c==17:
  print("YES")
else:
  print("NO")

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

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

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

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

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

Solution (Python):
A, B, C = map(str, input().split())
ABC = A+B+C
c1 = ABC.count('7')
c2 = ABC.count('5')
if c1==1 and c2==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, b, c = map(int, input().split())
if (a, b, c) == (5, 5, 7):
  print("YES")
elif (a, b, c) == (5, 7, 5):
  print("YES")
elif (a, b, c) == (7, 5, 5):
  print("YES")
else:
  print("NO")

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

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

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

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

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

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

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

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

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

Solution (Python):
'''To count the number of occurrences of 
something in a programs

Use count fucntion of the list
'''


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

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

a=0
b=0
for i in range(3):
    if word[i]==int(5):
        a=a+1
for i in range(3):
    if word[i]==int(7):
        b=b+1
if a==2 and b==1:
	print("YES")
else:
  	print("NO")

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

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

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

Solution (Python):
l = list(map(int, input().split()))
if min(l) == 5:
    l.remove(5)
    if min(l) == 5:
        l.remove(5)
        if min(l) == 7:
            print ("YES")
            exit ()
print ("NO")

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

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

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

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

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

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

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

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

Solution (Python):
line = input().split(' ')
C5 = 0
C7 = 0
for i in line:
  if i == '5':
    C5 += 1
  if i == '7':
    C7 += 1
if C5 == 2 and C7 == 1:
  print('YES')
else:
  print('NO')

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

if cnt5==2 and cnt7 ==1:
    print("YES")
else:
    print("NO")

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

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

Solution (Python):
A,B,C= list(map(int, input().split()))
check1 = A * B * C
check2 = A + B + C
if check1 == 175 and check2 == 17:
    print("YES")
else:
    print("NO")

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

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

Solution (Python):
def main():
  a = list(input().split())
  a = [int(aa) for aa in a]
  a = sorted(a)
  if a==[5,5,7]:
    print('YES')
  else:
    print('NO')
  
  
if __name__ == "__main__":
  main()

Solution (Python):
a, b, c = map(int, input().split())
abc = sorted([a, b, c])
if abc[0] == 5 and abc[1] == 5 and abc[2] == 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):
abc = input()

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

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

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

Solution (Python):
I=input().split()
c5=0
c7=0

for i in I:
  if i=="5":
    c5+=1
  elif i=="7":
    c7+=1
if c5==2 and c7==1:
  print("YES")
else:
  print("NO")

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

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

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

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

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

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