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: Wrong Answer

Solution code:
a, b, c = (int(i) for i in input().split())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b, c = map(int,input().split())
sn = [a,b,c]
if sn.count(7)==1 and sn.count(5)==2:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A = input().split()
if (a==2 for a in A):
 print("YES")
else:
 print("NO")

Submission status: Wrong Answer

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

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

if (a==2 and b ==1):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

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

if (a==2 and b ==1):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

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

if (a==2 and b ==1):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

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

if (a==2 or b ==1):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

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

if (a==2 or b ==1):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

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

if (a==2 or b ==1):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

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

if (a==2 and b ==1):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

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

if (a==2 or b ==1):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# １行の入力データを分割
def f(data):
    for i in range(3):
        if 0 > int(data[i]) or int(data[i]) > 10:
            print("NO")
            return 0

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

    return 0

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# １行の入力データを分割
def f(data):
    for i in range(3):
        if 0 > int(data[i]) or int(data[i]) > 10:
            print("NO")
            return 0

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

    return 0

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# １行の入力データを分割
def f(data):
    for i in range(3):
        if 0 > int(data[i]) or int(data[i]) > 10:
            print("NO")
            return 0

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

    return 0

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# １行の入力データを分割
def f(data):
    for i in range(3):
        if 0 > int(data[i]) or int(data[i]) > 10:
            print("NO")
            return 0

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

    return 0

data = input().split()

f(data)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# １行の入力データを分割
def f(data):
    for i in range(3):
        if 0 > int(data[i]) or int(data[i]) > 10:
            print("NO")
            return 0

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

    return 0

data = input().split()

f(data)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# １行の入力データを分割
data = input().split()

print(data)

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# １行の入力データを分割
data = input().split()

print(data)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys
from collections import defaultdict

args = sys.argv
dd = defaultdict(int)

for arg in args:
    dd[arg] += 1

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

count5 = 0
count7 = 0

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

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

Submission status: Wrong Answer

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

count5 = 0
count7 = 0

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

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

Submission status: Wrong Answer

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

count5 = 0
count7 = 0

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

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

Submission status: Wrong Answer

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

count5 = 0
count7 = 0

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

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

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':
    A, B, C = raw_input().split()
    if A == '5' and B == '7' and C == '5':
        print 'YES'
    else:
        print 'NO'

Submission status: Wrong Answer

Solution code:
# coding: utf-8
a = list(map(int, input().split()))
comp = [5,5,7]
for i,x in enumerate(sorted(a)):
    if x != comp[i]:
        print('NO')
        exit()
print('Yes')

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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: Wrong Answer

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

if V in [(5, 5, 7), (5, 7, 5), (7, 5, 5)]:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
w = input()
l = list(w)
l.sort()
ans = l[0] + l[1] + l[2]
if l == '557':
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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



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

if __name__ == "__main__": main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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: Wrong Answer

Solution code:
def main():
    a = list(map(int, input().split()))
    a_set = list(set(a))
    a.sort()
    a_set.sort()
    
    if 5 not in a_set or 7 not in a_set:
        print("NO")
    else:
        c5 = 0
        c7 = 0
        for x in range(len(a)):
            if a[x] == 5:
                c5 += 1
            elif a[x] == 7:
                c7 += 1
        if c5 == 2 and c7 == 1:
            print("OK")
        else:
            print("NO")


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b, c = list(map(int, input().split(" ")))
if a+b+c == 17 and (a == b == 5 or b == c == 5 or c == a == 5):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n = list(map(int,input().split()))
if 5 in n :
    n.remove(5)
    if 5 in n :
        if 7 in n :
            print("YES")
else :
    print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B, C = list(map(int, input().split(" ")))

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

Submission status: Wrong Answer

Solution code:
A, B, C = list(map(int, input().split(" ")))

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

Submission status: Wrong Answer

Solution code:
print("input the number of syllables: ")
A, B, C  = map(int, input().split())
if A and B and C >= 1:
        if A and B and C <= 10:
             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: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
sum=a+b+c
g=[5,7]
if a and b and c in g:
    if sum==17:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
l=map(int,raw_input().split())
if l.count(5)==2 and l.count(7)==1  :
    print 'yes'
else:
    print 'no'

Submission status: Wrong Answer

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

def check(data):
    five_count = 0
    seven_count = 0

    for i in data:
        if i == 5:
            five_count += 1
        elif i == 7:
            seven_count += 1
    if five_count == 2 and seven_count == 1:
        return True
    else:
        return False

if __name__ == "__main__":

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

    if check([A, B, C]):
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7


def main():
    a = list(map(int,input().split()))
    if sum(a) == 12:
        return 'YES'
    return 'NO'



print(main())

Submission status: Wrong Answer

Solution code:
A, B, C = map(int, raw_input().split())

if [A, B, C].count(5) == 2 and [A, B, C].count(7) == 1:
    print 'Yes'
else:
    print 'No'

Submission status: Wrong Answer

Solution code:
user_input = raw_input()

num_list = user_input.split()

for num in num_list:
    if num not in ['5','5','7']:
        flag = False
    else: flag = True
    
if flag == False:
    print 'NO'
else: print 'YES'

Submission status: Wrong Answer

Solution code:
a = sorted([int (s) for s in input().strip().split(' ')])
print("YES" if a == [5,5,7] else "No")

Submission status: Wrong Answer

Solution code:
print("hoge")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
five = 0
seven = 0
a = map(int, "5 7 5".split())
for i in a:
    if i == 5:
        five = five + 1
    if i == 7 :
    	seven = seven + 1

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
five = 0
seven = 0
a = map(int, raw_input().split())
for i in a:
    if i == 5:
        five = five + 1
    if i == 7 :
    	seven = seven + 1

if i == 5 and i == 7:
	print "YES"
else:
	print "NO"

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def is_haiku(s):
    nums = s.split()
    counts = {x: nums.count(x) for x in nums}
    try:
        if counts['5'] == 2 and counts['7'] == 1:
            print("YES")
    finally:
        print("NO")

if __name__ == "__main__":
    is_haiku(input())

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Here your code !
ipt = input().split(" ")
j,k =0,0
for i in [ int(i) for i in ipt]:
    if i == 5:
        k += 1
    elif i==7:
        j += 1
    print(ipt,i,k,j)

if j == 1 and k == 2:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#coding :UTF-8
#ABC042

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

Submission status: Wrong Answer

Solution code:
print "YES" if raw_input() in ["5 5 7", "5 7 5" "7 5 5"] else "NO"

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Time Limit Exceeded

Solution code:
l=[2658,3]
d=[2,4,5]
d_bar=[]
for m in range(10):
    if m not in d:
        d_bar.append(m) 
d_bar.sort()
n=[int(k) for k in str(l[0])]

for i in range(len(n)):
    dig1=''
    dig2=0
    for j in range(l[1]):
        p=dig1.join(str(d_bar[j]))
        if int(p)>l[0]:
          dig2=dig2+int(dig1)*l[1]**(l[0]-i)
          break
        dig1=p     
dig2=dig2+1
r=int(dig1)
q=int(dig1)
R=[]
while q!=0 or q!=1:
    q=q/l[1]
    r=q%l[1]
    R.insert(0,r)
s=''
for t in range(len(R)):
    s=s+str(R[t])
print(int(s))

Submission status: Time Limit Exceeded

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: Time Limit Exceeded

Solution code:
import numpy as np

x = map(int,raw_input().split())
if np.sum(x) == 17 :
	print "YES"
else :
	print "NO"

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = 'NO'

if A.count(5) == 2 and A.count(7) == 1:
    ans = 'YES'

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
abc = list(input().split())

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

Submission status: Accepted

Solution code:
a = input()
b = a.split()

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

Submission status: Accepted

Solution code:
x = input()
str_a = x.split(" ")
array=[0]*10
for s in str_a:
  array[int(s)]+=1
if array[5]==2 and array[7]==1:
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

ward_sorted = sorted(ward)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
line = input()

if line == '5 5 7' or line == '5 7 5' or line == '7 5 5':
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

check_count = 0
for i in val:
    if i not in [5, 7]:
        print('NO')
    if i == 5:
        check_count += 1

if check_count == 2:
    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:
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:
x = input()
mode = 0
count = 0
for num in x.split(" "):
  if num == '5':
    mode+=1
  elif num =='7':
    mode+=4
  count+=1

if mode == 6 and count == 3:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
def iroha():
    A, B, C = map(int, input().split())
    S = A + B + C
    if S == 17:
        print("YES")
    else:
        print("NO")


if __name__ == "__main__":
    iroha()

Submission status: Accepted

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

if Len.count(5) == 2 and Len.count(7) == 1:
  print('YES')
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:
lst = list(map(int, input().split()))
lst.sort()

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

Submission status: Accepted

Solution code:
a,b,c = 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:
def atc_042a(input_value: str) -> str:
    ABC = input_value.split(" ")
    if ABC.count("5") == 2 and ABC.count("7") == 1:
        return "YES"
    return "NO"

input_value_1 = input()
print(atc_042a(input_value_1))

Submission status: Accepted

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

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

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

elif 5 == a[0]:
    if (7 == a[1] and 5 == a[2]) or (5 == a[1] and 7 == a[2]):
        print("YES", end="\n")
    else:
        print("NO", end="\n")   
else:
    print("NO", end="\n")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
l = [int(x) for x in input().split()]
l = sorted(l)
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 == 17 and a*b*c == 175:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

for i in a:
  if i==5:
    num_5 = num_5+1
  if i==7:
    num_7 = num_7+1

if num_5==2 and num_7==1:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
text = str(input())
cnt = 0

for i in text:
    if i == "5":
        cnt += 1
    if i == "7":
        cnt += 2

if cnt == 4:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
"""
ABC042 A 和風いろはちゃんイージー
https://atcoder.jp/contests/abc042/tasks/abc042_a
"""

l = list(map(int, input().split()))
l5 = l.count(5)
l7 = l.count(7)

if l5 == 2 and l7 == 1:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
print(['YES','NO'][sum(list(map(int,input().split()))) != 17])

Submission status: Accepted

Solution code:
A,B,C = map(int,input().split())
sev = 0
fiv = 0

if A == 7 :
  sev += 1
elif A == 5:
  fiv += 1
if B == 7:
  sev += 1
elif B == 5:
  fiv += 1
if C == 7:
  sev += 1
elif C == 5:
  fiv += 1
if sev == 1 and fiv == 2:
  print("YES")
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:
a,b,c = map(int,input().split())
if a%5!=0 and a%7!=0:
  print('NO')
elif b%5!=0 and b%7!=0:
  print('NO')
elif c%5!=0 and c%7!=0:
  print('NO')
elif a%7==0:
  if b%5==0 and c%5==0:
    print('YES')
  else:
    print('NO')
elif b%7==0:
  if a%5==0 and c%5==0:
    print('YES')
  else:
    print('NO')
else:
  if a%5==0 and b%5==0:
    print('YES')
  else:
    print('NO')

Submission status: Accepted

Solution code:
import math
from datetime import date

def main():
		
	line = input().split()
	a = [int(x) for x in line]
	a.sort()

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():
    a, b, c = map(int, input().split())
    list = []
    list.append(a)
    list.append(b)
    list.append(c)

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
A, B, C = map(int, input().split())
 
num5 = 0
num7 = 0
ans = 'NO'
 
for num in [A, B, C]:
  if num == 5:
    num5+=1
  elif num == 7:
    num7+=1
  else:
    break
if num5 ==2 and num7 == 1:
  ans = 'YES'
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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