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:
import fileinput

def main(arg_list):
    if(len(arg_list) == 3 and arg_list.count('5')==2 and arg_list.count('7') == 1):
        print("YES")
        return 
    print("NO")

if __name__ == "__main__":
    for line in fileinput.input():
        main(line.rstrip("\n\r").split(" "))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = sorted(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 = list(map(int, input().split()))
n = sum(x == 7 for x in a)
k = sum(x == 5 for x in a)
if n == 1 and k == 2:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
s=input().split()
count=0
for n in range(3):
    if s[n]=="5":
        count+=1
    elif s[n]=="7":
        continue
    else:
        count=3
        break
if count==2:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
A, B, C = [int(i) for i in input().split()]

five = 0
seven = 0
for x in [A, B, C]:
    if x == 5:
        five += 1
    elif x == 7:
        seven += 1

ans = five == 2 and seven == 1

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

Submission status: Accepted

Solution code:
phase = input().rstrip().split(" ")
count5 = count7 = 0
for i in phase:
  if i == "5":
    count5 += 1
  elif i == "7":
    count7 += 1
if count5 == 2 and count7 == 1:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
s = input().split() #s_1 s_2を分割して取得し、sに値を入れる
five = 0
seven = 0
for i in range(3):
    if s[i] == '5':
        five += 1
    if s[i] == '7':
        seven += 1
        
if five == 2 and seven == 1:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#listに[a,b,c]形式で入力取得
box = list(map(int, input().split()))

#listの5と7の数をサーチする
#5が2個、7が2個ならYESを出力。違うならNO
if box.count(5) == 2 and box.count(7) == 1:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
a,b,c=input().split()
d=a+b+c
if d.count("7")==1 and d.count("5")==2:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c=map(int,input().split())
l={5:0,7:0}
l[a]=1
if not b in l:
  l[b]=0
l[b]+=1
if not c in l:
  l[c]=0
l[c]+=1

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

Submission status: Accepted

Solution code:
""" AtCoder """

l = list(input().split())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A=map(int,input().split())
r=0
o=0
for s in A:
    if s==5:
        r+=1
    if s==7:
        o+=1

print("YES") if r==2 and o==1 else print("NO")

Submission status: Accepted

Solution code:
ans = [5, 5, 7]
haiku = [int(i) for i in input().split()]

haiku.sort()

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

Submission status: Accepted

Solution code:
li = list(map(int,input().split()))
count5 = 0
count7 = 0

for number in li :
  if number == 5 :
    count5 += 1
  elif number == 7:
    count7 += 1

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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 == 5:
        if C == 5:
            print('YES')
        else:
            print('NO')
    else:
        print('NO')
else:
    print('NO')

Submission status: Accepted

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

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:
from collections import Counter

m = map(int, input().split())
cm = Counter(m)
if len(cm) == 2 and cm[5] == 2 and cm[7] == 1:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

def solve():
    if ABC.count(5) == 2 and ABC.count(7) == 1:
        return "YES"
    else:
        return "NO"

print(solve())

Submission status: Accepted

Solution code:
A = sorted([int(i) for i in input().split()])
print('YES' if A == [5, 5, 7] else '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 b==5 or b==7:
    if a+b+c==17:
        print("YES")
    else:
        print("NO")
else:
    print("NO")

Submission status: Accepted

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

li.sort()

ans = 'YES' if li == [5, 5, 7] else 'NO'


print(ans)

Submission status: Accepted

Solution code:

a=list([int(i) for i in input().split()])
print('YES' if sorted(a)==[5,5,7] else 'NO')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
if s == "7 5 5" or s == "5 7 5" or s == "5 5 7" :
  print("YES")
else :
  print("NO")

Submission status: Accepted

Solution code:
l=sorted(map(int,input().split()))
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())
flag = 0

if A+B+C == 17:
  if abs(A-B) == 0 and C == 7:
    flag = 1
  elif abs(A-B) == 2 and C == 5:
    flag = 1
  
if flag == 1:
  print('YES')
else:
  print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
inpstr = input()

inp = inpstr.split(" ")
inp = list(map(int,inp))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
inpt = input().split()
inpt.sort()

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

Submission status: Accepted

Solution code:
data = list(map(int, input().split()))
data.sort()
print('YES' if data[0] == data[1] == 5 and data[2] == 7 else '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:
abc = list(map(int, input().split()))
lengths = [0,0]
for i in abc:
    if i == 5: lengths[0] += 1
    if i == 7: lengths[1] += 1

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input_list = sorted(map(int, input().rstrip().split()))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
haiku_list = ['5', '7', '5']

str_input_list = input().rstrip().split(' ')

for a in range(3):
    if haiku_list[a] in str_input_list:
        str_input_list.remove(haiku_list[a])
        haiku_list[a] = '*'

if haiku_list == ['*', '*', '*']:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c=map(int,input().split())
list=[]
ans=0
list.append(a)
list.append(b)
list.append(c)
for i in range(3):
    if list[i]==5:
        ans+=1
    elif list[i]==7:
        ans+=10
print("YES" if ans==12 else "NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
L=list(map(int,input().split()))
table=[5,5,7]
L=sorted(L)
if table == L:
  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:
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:
def execute(s):
    return ['NO', 'YES'][s.count('5') == 2 and s.count('7') == 1]


if __name__ == '__main__':
    print(execute(input()))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
li = list(map(int, input().split()))
li.sort()
if li[0] == li[1] == 5 and li[2] == 7:
	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:
ABC = list(map(int,input().split()))

print("YES" if ABC.count(5)==2 and ABC.count(7)==1 else "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:
l = input()
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()))

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = sorted([int(x) for x in input().split()])
if x == [5, 5, 7]:
    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,b,c = [int(x) for x in 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:
D = sorted(list(map(int,input().split())))
if D == [5,5,7]:
  print("YES")
else:
  print("NO")

Submission status: Accepted

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


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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())
five = 0
seven =0
if a == 5:
  five = five + 1;
elif a == 7:
  seven = seven + 1;
if b == 5:
  five = five + 1;
elif b == 7:
  seven = seven + 1;
if c == 5:
  five = five + 1;
elif c == 7:
  seven = seven + 1;
if five == 2 and seven == 1:
  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:
print(['NO','YES'][list(sorted(input().split()))==['5','5','7']])

Submission status: Accepted

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

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=sorted([int(i) for i in input().split()])
if A==[5,5,7]:
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

dat.sort()

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

Submission status: Accepted

Solution code:
f = False
a = input().split(' ')
for i in range(3):
  a[i]=int(a[i])
while True:
  for i in range(3):
    if a[i] != 5 and a[i] != 7:
      print('NO')
      f = True
      break
  if f == True:
    print(2)
    break
  if a[0] + a[1] + a[2] == 17:
    print('YES')
    break
  else:
    print('NO')
    break

Submission status: Accepted

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

Submission status: Accepted

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

nlist = [A, B, C]
nlist2 = sorted(nlist)
if nlist2[2] == 7:
    if nlist2[0] == nlist2[1] == 5:
        print('YES')
    else:
        print('NO')
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,B,C=map(int,input().split())
list=[A,B,C]
list.sort()
if([5,5,7]==list):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
A = 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())
li = [A, B, C]
li.sort()
print('YES' if li == [5, 5, 7] else 'NO')

Submission status: Accepted

Solution code:
# 

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

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


def main():
    """Function."""
    line = list(map(int, input().split()))

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
d= input().rstrip()
d_list = d.split(" ")

def solution(d_list):
    if d_list.count("5") !=2:
        return "NO"
    else:
        if d_list.count("7") !=1:
            return "NO"
        else:
            return "YES"
            
def main():
    print(solution(d_list))
    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from statistics import mean, median,variance,stdev
import sys
import math

x = input().split()
#y = input().split()
a = []
for i in range(len(x)):
   a.append(int(x[i]))

a.sort()
if a[0]*a[1] == 25 and a[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:
s=input()
print('YES' if s=='5 5 7' or s=='5 7 5' or s=='7 5 5' else 'NO')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
A,B,C = map(str,input().split())
S = A+B+C
if S.count("5") ==2 and S.count("7") == 1:
  print("YES")
else:
  print("NO")

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:
A=list(map(int,input().split()))
from collections import Counter
counter=Counter(A)
if counter[5]==2 and counter[7]==1:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

count_5 = 0
count_7 = 0

#aについて
if a == 5:
	count_5 += 1
elif a == 7:
	count_7 += 1

#bについて
if b == 5:
	count_5 += 1
elif b == 7:
	count_7 += 1

#cについて
if c == 5:
	count_5 += 1
elif c == 7:
	count_7 += 1

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

Submission status: Accepted

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

Submission status: Accepted

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

ans1 = 0
ans2 = 0

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import sys

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import itertools
a=input().split()
#print(type(a))
b=itertools.permutations('575')
b=list(b)
flag=0
for i in range(len(list(b))):
  c=b[i][0]+b[i][1]+b[i][2]
#  print(type(c))
  if list(c)==a:
    flag=1
print('YES' if flag==1 else 'NO' )

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

import sys

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

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

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

# Uncomment before submission
main()

Submission status: Accepted

Solution code:
A, B, C = [int(_) for _ in 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()))

a.sort()

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
ABC = map(int, raw_input().split())
print "NO" if sum(ABC) != 17 or (5 not in ABC and 7 not in ABC) else "YES"

Submission status: Accepted

Solution code:
input_1 = input()

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
import collections
import itertools
import array
import inspect

# Set max recursion limit
sys.setrecursionlimit(1000000)


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


# Binary converter
def to_bin(x):
    return bin(x)[2:]


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


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


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

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

    return v


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


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

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

    return v


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

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

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

        cps = n_cps[:]

    return dfk


# Depth First Search (+Distance)
def dfs_d(v, pre, dist):
    """
    v:  現在のノード
    pre: １つ前のノード
    dist: 現在の距離

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

    global D
    global D_dfs_d

    D_dfs_d[v] = dist

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

    return


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


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

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

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

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

    return result

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

# --------------------------------------------

dp = None


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

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




main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

five = 0; seven = 0

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

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

Submission status: Accepted

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

number_list = [A, B, C]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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