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



Sample input:
5 5 7


Sample output:
YES

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-
#入力
a = list(map(int,input().split()))

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

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

Submission status: Accepted

Solution code:
ABC = [int(_) for _ in input().split()]

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

Submission status: Accepted

Solution code:
args = []
args = input()

count_5 = 0
count_7 = 0

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

S.sort()

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

abc.sort()

is575 = True

if abc[0] != 5:
    is575 = False
if abc[1] != 5:
    is575 = False
if abc[2] != 7:
    is575 = False

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input().rstrip().split()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def equal_list(lst1, lst2):
    lst = lst1.copy()
    for element in lst2:
        try:
            lst.remove(element)
        except ValueError:
            break
    else:
        if not lst:
            return "YES"
    return "NO"


HAIKU = [5, 7, 5]
v = list(map(int, input().split()))
print(equal_list(v, HAIKU))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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) and a + b + c == 17:
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())
# まず長さが7の文節があるか確認
if a*b*c==5*5*7:
	print("YES")
 
else:
	print("NO")

Submission status: Accepted

Solution code:
  
  # 文節の入力(整数として扱う)
a, b, c = map(int, input().split())
# まず長さが7の文節があるか確認
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")

Submission status: Accepted

Solution code:
A = list(map(int,input().split()))
ans = 'NO'
if A.count(5) == 2:
    if A.count(7) == 1:
        ans = 'YES'
print(ans)

Submission status: Accepted

Solution code:
s=sorted(list(input().split()))
if(s[0]=="5" and s[1]=="5" and s[2]=="7"):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
N = list(input().split())
flag = False
count_5 = 0
count_7 = 0
for n in N:
  a = int(n)
  if a == 5:
    count_5 = count_5 + 1
  elif a == 7:
    count_7 = count_7 + 1
  else:
    flag = True
    break
  if flag:
    break
if (count_5 == 2) and (count_7 == 1):
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
s=input().rstrip().split()

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

Submission status: Accepted

Solution code:
# -*-coding: utf-8 -*-

#整数の入力
a = list(map(int, input().split()))
total = 0

for i in a:
  if i == 5 or i == 7:
  	total = total + i

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
L=list(map(int, input().split()))
L.sort()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

s = [5,7,5]
for a in l:
    if a in s:
        s.remove(a)
if s == []:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
abc = list(map(int, input().split()));

five, seven = 0, 0;

for i in range(3):
    if abc[i] == 5:
        five += 1;
    elif abc[i] == 7:
        seven += 1;
    else:
        continue;

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
A, B, C = map(int, input().split())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
arr_str = input().split(" ")
ans = 0
for a in arr_str:
    if(a == "5"):
        ans = ans + 1
    elif(a=="7"):
        ans =ans +10

if( ans == 12):
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

abc = list(input().split())
s = "".join(abc)

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

Submission status: Accepted

Solution code:
ABC = sorted(list(map(int,input().split())))

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

Submission status: Accepted

Solution code:
ls = list(map(int, input().split()))
count5, count7, ans = 0, 0, "NO"

for digit in ls:
    if digit == 5:
        count5 += 1
    elif digit == 7:
        count7 += 1

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
numList = input().split()

if len(numList) != 3:
  print('NO')
elif numList.count('5') != 2:
  print('NO')
elif numList.count('7') != 1:
  print('NO')
else:
  print('YES')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = [int(x) for x in input().split(' ')]
print('YES' if sum(x) == 17 and set(x) == set([5, 7]) else 'NO')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
A, B, C = map(int, input().split())
 
if A+B+C==17:
  print('YES')
else:
  print('NO')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = sorted(list(input().split()))
if n[0] == '5' and n[1] == '5' and n[2] == '7':
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

i = sum(n)

if i % 17 == 0:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
m = list(map(int, input().split()))

count5 = len([i for i in m if i == 5])
count7 = len([i for i in m if i == 7])
if count5 == 2 and count7 == 1:
  print('YES')
else:
  print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c = map(int,input().split())
f,s = 0,0
for z in [a,b,c]:
    if z == 5:
        f += 1
    elif z == 7:
        s += 1
if f == 2 and s == 1:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
  
a.sort()
  
ans = True
  
if a[0] != 5:
    ans = False
if a[1] != 5:
    ans = False
if a[2] != 7:
    ans = False

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

Submission status: Accepted

Solution code:
A=[x for x in input().split()]
c5=0
c7=0
for i in range(3):
  if A[i]=='5':
    c5=c5+1
  elif A[i]=='7':
    c7=c7+1
if c5==2 and c7==1:
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
a = input()

iroha = ['5 5 7','5 7 5', '7 5 5']

if a in iroha:
        print("YES")
else :
        print("NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ABC042A - 和風いろはちゃんイージー / Iroha and Haiku (ABC Edition)
def main():
    A = sorted(map(int, input().split()))
    flg = A == [5, 5, 7]
    print("YES" if flg else "NO")


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

if sum(a) == 17 and min(a) == 5:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input_line=input().rstrip().split(" ")
five=int(input_line.count("5"))
seven=int(input_line.count("7"))
if five==2 and seven==1:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
result = input().split()
message = "NO"
if int(result[0]) == 7:
    if int(result[1]) == 5:
        if int(result[2]) == 5:
            message = "YES"
elif int(result[0]) == 5:
    if int(result[1]) == 7:
        if int(result[2]) == 5:
            message = "YES"
    elif int(result[1]) == 5:
        if int(result[2]) == 7:
            message = "YES"
print(message)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# ABC042 A  Iroha and Haiku (ABC Edition)
a,b,c = map(int,input().split())

count_five = 0
count_seven = 0

if a == 5:
    count_five += 1
elif a == 7:
    count_seven += 1

if b == 5:
    count_five += 1
elif b == 7:
    count_seven += 1

if c == 5:
    count_five += 1
elif c == 7:
    count_seven += 1

if count_five == 2 and count_seven == 1:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

List.sort()

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

Submission status: Accepted

Solution code:
input_line = input().split()
count = 0
for i in input_line:
  count += int(i)
if count == 17:
  print('YES')
else:
  print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:


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

Submission status: Accepted

Solution code:
num = list(map(int,input().split()))
count5 = 0
count7 = 0
for i in num:
    if i == 5:
        count5 += 1
    elif i == 7:
        count7 += 1
    else:
        continue
if count5 == 2 and count7 == 1:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
# AtCoder Beg Contest 042 A (100)
a, b, c = map(int, input().split())
if a > b:
    a, b = b, a
if b > c:
    c, b = b, c
if a == 5 and b == 5 and c == 7:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
a,b,c = input().strip().split()
d = a + b + c
if d == "755" or d == "575" or d == "557":
  print ("YES")
else:
  print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input().rstrip().split(' ')
counta = 0
countb = 0
for i in range(int(len(s))):
	if int(s[i]) == 7:
		counta += 1
	elif int(s[i]) == 5:
		countb += 1
if counta == 1 and countb == 2:
	print('YES')
else:
	print('NO')

Submission status: Accepted

Solution code:
abc=[int(i) for i in input().split()]
num_five=0
num_seven=0

for i in range(3):
  if abc[i]==5:
    num_five+=1
  elif abc[i]==7:
    num_seven+=1

if num_five==2 and num_seven==1:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
#! /usr/bin/env python
# -*- coding: utf-8 -*-

import pdb
import sys
F = sys.stdin

a = list(map(int,F.readline().rstrip().split()))
countfive = 0
countseven = 0

for i in range(len(a)):
    if a[i] == 5:
        countfive += 1
        continue
    if a[i] == 7:
        countseven += 1
        continue

if (countfive == 2) and (countseven == 1):
    print('YES')
    sys.exit()

print('NO')

Submission status: Accepted

Solution code:
L=input();print('YNEOS'[L.count('5')!=2 or '7' not in L::2])

Submission status: Accepted

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

S.sort()

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def check_a(numbers):
    if numbers.count(5) == 2 and numbers.count(7) == 1:
        return 'YES'
    else:
        return 'NO'


def main():
    numbers = list(map(int, input().split()))
    print(check_a(numbers=numbers))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
L = list(map(int, input().split()))
L.sort()
for i in range(2):
  if not L[i] == 5:
    print("NO")
    exit()
if not L[2] == 7:
  print("NO")
  exit()
print("YES")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B, C = input().split()
x = A + B + C
if x.count('5') == 2 and x.count('7') == 1:
  print('YES')
else:
  print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

if(a+b+c=='557')or(a+b+c=='575')or(a+b+c=='755'):
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

i = 0
if a.count(5) == 2:
    if a.count(7) == 1:
        print('YES')
        i = i + 1
if i == 0:
    print('NO')

Submission status: Accepted

Solution code:
a= input()
if a.count('5') == 2:
  if a.count('7') == 1:
    print('YES')
    exit()
print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

count_5 = line.count(5)
count_7 = line.count(7)

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

Submission status: Accepted

Solution code:
num5 = 0
num7 = 0
for num in map(int, input().split()):
    if num == 5:
        num5 += 1
    elif num == 7:
        num7 += 1
    else:
        print('NO')
        exit()

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

Submission status: Accepted

Solution code:
A,B,C=map(int, input().split())
x=0
y=0
if A==5:
    x+=1
if B==5:
    x+=1
if C==5:
    x+=1
if A==7:
    y+=1
if B==7:
    y+=1
if C==7:
    y+=1
if x==2 and y==1:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
Haiku = list(map(int, input().split()))
Haiku.sort()

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
abc = input().replace(' ', '')

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

Submission status: Accepted

Solution code:
def slove():
    import sys
    input = sys.stdin.readline
    a = "".join(sorted(list(map(str, str(input().rstrip('\n')).split()))))
    print("YES" if a == "557" else "NO")


if __name__ == '__main__':
    slove()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
data = input().split()
 
flag1 = 0
flag2 = 0
 
for i in range(3):
  if data[i] == '5':
    flag1 += 1
  elif data[i] == '7':
    flag2 += 1
 
if flag1 == 2 and flag2 == 1:
  print('YES')
else:
  print('NO')

Submission status: Accepted

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

list = [a,b,c]

if(7 in list):
    if list.count(5)==2:
        print("YES")
    else:
        print("NO")
else:
    print("NO")

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x,y,z = map(int,input().split())

if x==5 and y==5 and z==7 :
    print('YES')
elif x==5 and y==7 and z==5:
    print('YES')
elif x==7 and y==5 and z==5:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

five = 0
seve = 0
for i in ABC:
  if i == 5:
    five += 1
  if i == 7:
    seve += 1
    
if five == 2 and seve == 1:
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
array = input().split()
if int(array[0]) + int(array[1]) + int(array[2]) == 17:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
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 a==7:
 if b==5 and c==5:
  print("YES")
 else:print("NO")
else:
 print("NO")

Submission status: Accepted

Solution code:
data=input().split(" ")

five=data.count("5")
seven=data.count("7")

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- Coding: utf-8 -*-
a, b, c = map(int, input().split())
num_list = [a, b, c]

seven_cnt = 0
five_cnt = 0
for n in num_list:
  if n == 7:
    seven_cnt += 1
  elif n == 5:
    five_cnt += 1
if seven_cnt == 1 and five_cnt == 2:
  print('YES')
else:
  print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x,y,z = map(int,input().split())
if x == 5 and y == 7 and z == 5:
  print('YES')
elif x == 5 and y == 5 and z == 7:
  print('YES')
elif x == 7 and y == 5 and z == 5:
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
nums = input().split()
if nums.count('5') == 2 and nums.count('7') == 1:
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=input().split()
b=0
for i in a:
  if i in ['5','7']:
    b=b+int(i)
    re='Yes'
  else:
    b=b+int(i)
    re='No'
    break
    
if b==17 and re!='No':
  print('YES')
else:
  print('NO')

Submission status: Accepted

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