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 os

if __name__ == "__main__":
    temp = input().split(" ")
    if temp.count("5") == 2 and temp.count("7") == 1:
        print("YES")
    else:
        print("NO")

Submission status: Accepted

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

for i in range(3):
	if ABC[i] == 5:
		count_5 += 1
	elif ABC[i] == 7:
		count_7 += 1

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

Submission status: Accepted

Solution code:
a,b,c=map(int,input().split())
print("YES" if a+b+c==17 and a*b*c==175 else "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,b,c=map(int,input().split())
List=[a,b,c]
if List.count(5)==2 and List.count(7)==1:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
hantei = []
A,B,C=map(int,input().split())
hantei.append(A)
hantei.append(B)
hantei.append(C)
if 5 in hantei:
    hantei.pop(hantei.index(5))
    if 5 in hantei:
        if 7 in hantei:
            print("YES")
        else:
            print("NO")
    else:
        print("NO")



else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

five=0
seven=0
for a in s:
    if(a == "5"):
        five += 1
    elif(a=="7"):
        seven += 1

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(3):
    if a[i]==5:
        f+=1
    elif a[i]==7:
        s+=1
if s==1 and f==2:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
import sys


def solve(inp):
    A = list(map(int, inp.readline().strip().split(' ')))

    A = sorted(A)
    if A[0] == 5 and A[1] == 5 and A[2] == 7:
        return "YES"
    else:
        return "NO"


def main():
    result = solve(sys.stdin)
    if result:
        print(result)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
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:
l = sorted(list(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:
num= input().split()
count5 = 0
count7 = 0
 
for i in range(len(num)):
    if num[i] == '5':
        count5 += 1
    elif num[i] == '7':
        count7 += 1
    else:
        continue
if count5 == 2 and count7 == 1:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

fcount = 0
scount = 0

if a == 5 :
  fcount += 1
elif a == 7:
  scount += 1

if b == 5 :
  fcount += 1
elif b == 7:
  scount += 1

if c == 5 :
  fcount += 1
elif c == 7:
  scount += 1

if fcount == 2 and scount == 1:
  print("YES")
else :
  print("NO")

Submission status: Accepted

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

fcount = 0
scount = 0

if a == 5 :
  fcount += 1
elif a == 7:
  scount += 1

if b == 5 :
  fcount += 1
elif b == 7:
  scount += 1

if c == 5 :
  fcount += 1
elif c == 7:
  scount += 1

if fcount == 2 and scount == 1:
  print("YES")
else :
  print("NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
li = [int(i) for i in input().split()]
li.sort()
a = "NO"
if li[0] == 5 and li[1] == 5 and li[2] == 7 :
    a = "YES"
print(a)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
nums = [int(i) for i in input().split()]
cnt_5 = 0
cnt_7 = 0

for i in range(3):
  if nums[i] == 5:
    cnt_5 += 1
  if nums[i] == 7:
    cnt_7 += 1
 
if cnt_5 == 2 and cnt_7 == 1:
  print('YES')
else:
  print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
A = [int(x) for x in input().split()]
cnt_5 = 0
cnt_7 = 0
for i in A:
    if i == 5:
        cnt_5 += 1
    elif i == 7:
        cnt_7 += 1
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())
ans = 'NO'
if [A, B, C].count(5) == 2 and [A, B, C].count(7) == 1:
    ans = 'YES'
print(ans)

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
b = a.count(5)
c = a.count(7)
if b == 2 and c ==1:
            print('YES')
else:
            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:
a,b,c=(int(x) for x in input().split())
nana_count=0
go_count=0
def check(x):
  if x==5:
      global go_count
      go_count+=1
  elif x==7:
      global nana_count
      nana_count+=1
check(a)
check(b)
check(c)
if nana_count==1 and go_count==2:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
li = list(map(int,input().split()))
if sum(li) != 17 or max(li) != 7 or min(li) != 5:
  print("NO")
  exit()
print("YES")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

T = [int(_) for _ in input().split()]

x = sorted(T)
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())
print('YES' if a+b+c==17 and a*b*c==175 and max(a,b,c)==7 and min(a,b,c)==5  else'NO')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
data = [int(i) for i in input().split(" ")]
total = 0
for i in data:
    if i==7 or i==5:
        total += i
if total == 17:
  	print("YES")
else:
  	print("NO")

Submission status: Accepted

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

lis = [5, 7, 5]
for _ in [a, b, c]:
  if _ in lis:
    lis.remove(_)

if len(lis) == 0:
  print('YES')
else:
  print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

if arr == [5, 5, 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:
A = list(map(int, input().split()))
A.sort()

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

Submission status: Accepted

Solution code:
A, B, C = map(int, input().split())
if A + B + C == 17:
  if A == 5:
    if B + C == 12:
      print("YES")
    else:
      print("NO")
  elif A == 7:
    if B + C == 10:
      print("YES")
    else:
      print("NO")
  else:
    print("NO")
else:
  print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

al = sorted(al)

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

Submission status: Accepted

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

Submission status: Accepted

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

total = x + y + z

total = total - 7

if total % 10 == 0:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
import math
import fractions

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

Submission status: Accepted

Solution code:
from collections import Counter

ans = "NO"
A = Counter(input().split())
if A["5"] == 2:
  if A["7"] == 1:
    ans = "YES"
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

S.sort()
A = [5, 5, 7]

if S == A:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

if min(a,b,c) == 5 and max(a,b,c) == 7 and a+b+c == 17:
    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:
T = [int(x) for x in input().split()]
T.sort()
if T==[5, 5, 7]:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
T = [int(x) for x in input().split()]
Ts = sorted(T)
if Ts.count(5)==2 and Ts.count(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:
data = list(map(str, input().split()))

if data.count("5")==2 and data.count("7")==1:
    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:
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()
A=int(A)
B=int(B)
C=int(C)
num=[A,B,C]
num.sort()
if num==[5,5,7] :
	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:
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()))
print('YES' if s.count(5)==2 and s.count(7)==1 else 'NO')

Submission status: Accepted

Solution code:
s = list(map(int, input().split()))
print('YES' if sum(ss==5 for ss in s)==2 and sum(ss==7 for ss in s)==1 else 'NO')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B,C = map(int,input().split())
if A==1 or B==1 or C==1:
    print('NO')
    
MLT = A*B*C
if MLT == 175:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# # -*- coding: utf-8 -*-
A, B, C = sorted(map(int, input().split()))

import math
if 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())

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
values = sorted(int(v) for v in input().split())
if values == [5, 5, 7]:
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
a, b, c, = map(int, input().split())
h = [5, 5, 7]
b = [a, b, c]

if sorted(h) == sorted(b):
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

if (A+B+C==17) and (A==5 or A==7) and (B==5 or B==7):
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
# coding: utf-8
import sys


def main(argv=sys.argv):

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

  return 0


if __name__ == '__main__':
    sys.exit(main())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# conding: utf-8
import sys

def main(argv=sys.argv):
  
  abc = list(map(int, input().split()))
  
  if 5 in abc:
    abc.remove(5)
        
    if 5 in abc:
      
      if 7 in abc:
            print("YES")
          
      else:
        print("NO")
        
    else:
      print("NO")  
      
  else:
    print("NO")
    
  return 0


if __name__ == '__main__':
  sys.exit(main())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from itertools import permutations
a, b, c = map(int, input().split(' '))
l = list(permutations([5,5,7]))
if (a,b,c) in l:
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
from itertools import permutations
a, b, c = map(int, input().split(' '))
l = list(permutations([5,5,7]))
if (a,b,c) in l:
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-S
A,B,C= [int(i) for i in input().split()]

s = [A, B, C]
s.sort()
if s[0] == s[1] == 5 and s[2] == 7:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import queue
import bisect
import heapq
import time
import itertools

mod = int(1e9+7)

def swap(a,b):
    return (b,a)

def gcd(a,b): #最大公約数
    if (a<b):
        a,b = swap(a,b)
    if (b==0):
        return a
    else:
        return gcd(b,a%b)

def divisors(a): # 約数列挙
    divisors = []
    for i in range(1,int(a**0.5)+1):
        if a%i==0:
            divisors.append(i)
            if i!=a//i:
                divisors.append(a//i)
    return divisors

def is_prime(a): #素数判定
    if a<2:
        return False
    elif a==2:
        return True
    elif a%2==0:
        return False
    sqrt_num = int(a**0.5)
    for i in range(3,sqrt_num+1,2):
        if a%i==0:
            return False
    return True

def prime_num(a): #素数列挙
    pn = [2]
    for i in range(3,int(a**0.5),2):
        prime = True
        for j in pn:
            if i%j==0:
                prime = False
                break
        if prime:
            pn.append(i)
    return pn

def main():
    x = [y for y in map(int,input().split())]
    x.sort()
    f = 0
    s = 0
    for i in x:
        if i == 5:
            f += 1
        elif i == 7:
            s += 1
        else:
            print("NO")
            return
    if f==2 and s==1:
        print("YES")
    else:
        print("NO")
    return

if __name__=='__main__':
    main()

Submission status: Accepted

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

for i in range(3):
    if lst[i]==5:
        tmp += 1

print('YES' if sum(lst)==17 and tmp==2 else 'NO')

Submission status: Accepted

Solution code:
arr = map(int, input().split())
cnt_5 = cnt_7 = 0
for num in arr:
    if num == 5:
        cnt_5 += 1
    elif num == 7:
        cnt_7 += 1

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

Submission status: Accepted

Solution code:
arr = map(int, input().split())
dic = {}
for num in arr:
    if num in dic:
        dic[num] += 1
    else:
        dic[num] = 1
if dic[5] == 2 and dic[7] == 1:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
require = ['5','7','5']
data = input().split()
result = 'YES'
for d in data:
    if d in require:
        require.pop(require.index(d))
    else:
        result = 'NO'
        break
print(result)

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:

def main():
    a=[x for x in input().rstrip().split()]
    c5=0
    c7=0
    c5=a.count("5")
    c7=a.count("7")
    if c5==2 and c7==1:
        print("YES")
    else:
        print("NO")

main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=[x for x in input().rstrip().split()]
c5=0
c7=0
c5=a.count("5")
c7=a.count("7")
if c5==2 and c7==1:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
ip = input().split()
A = int(ip[0])
B = int(ip[1])
C = int(ip[2])

boolean = False
if A+B+C==17:
    if A==5 or B==5 or C==5:
        boolean = True

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

Submission status: Accepted

Solution code:
require = ['5','7','5']
data = input().split()
result = 'YES'
for v in data:
    if v in require:
        index = require.index(v)
        require.pop(index)
    else:
        result = 'NO'
        break

print(result)

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

a = map(int, sys.stdin.readline().split())

seven = 0
five = 0

for i in a:
    if i == 7:
        seven += 1
    else:
        five += 1

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# AtCoder Beginner Contest 042 - A
# -*- encoding: UTF-8 -*-
f_list = map(int, input().split())
l5 = 0
l7 = 0
result = "NO"

for f in f_list:
  if f == 5:
    l5 = l5 + 1
  elif f == 7:
    l7 = l7 + 1

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

Submission status: Accepted

Solution code:
flagY = 0
flagN = 0
a,b,c = [int(i) for i in input().split(" ")]
if a==7:
  if b==5 and c==5:
    flagY = 1
  else:
    flagN = 1
if b==7:
  if a==5 and c==5:
    flagY = 1
  else:
    flagN = 1
if c==7:
  if b==5 and a==5:
    flagY = 1
  else:
    flagN = 1
if flagY ==1:print("YES")
elif flagY == 0:print("NO")

Submission status: Accepted

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

d = [a, b, c]

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import itertools

haiku = list(map(int, input().split()))
p = list(itertools.permutations(haiku, 3))
print("YES" if (5, 7, 5) in p else "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

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

gokei = 0

for i in range(len(value)):
    gokei += value[i]
    
if gokei == 17:
    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:

"""
https://atcoder.jp/contests/abc042/tasks/abc042_a
"""

a = list(map(int,input().split()))
a.sort()
#print(a)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def answer(A,B):
  for i in range(len(A)):
    if A[i] != B[i]:
      return "NO"
  return "YES"

A=list(map(int,input().split()))
A.sort()
B=[5,5,7]
print(answer(A,B))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a= input().split()
a.sort()
if "".join(a) =="557":
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
import sys
from itertools import permutations

a = tuple(int(x) for x in sys.stdin.readline().split())

def main():
    for p in set(permutations([5, 5, 7], 3)):
        if a == p:
            return 'YES'
    return 'NO'

if __name__ == '__main__':
    ans = main()
    print(ans)

Submission status: Accepted

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

if ''.join(a) == '557':
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
a=input().split()
a=[int(i) for i in a]
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())

if a == '5' and b == '5':
    if c == '7':
        print('YES')
        exit(0)

if b == '5' and c == '5':
    if a == '7':
        print('YES')
        exit(0)

if a == '5' and c == '5':
    if b == '7':
        print('YES')
        exit(0)

print('NO')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#number_set = list(map(int, input().split()))
a = [5,5,7]
b = list(map(int, input().split()))

for i in a:
    if i in b:
        b.remove(i)

if len(b) == 0:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections

a = collections.Counter(input().split())

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

Submission status: Accepted

Solution code:
import collections

abc = collections.Counter(input().split())

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

Submission status: Accepted

Solution code:
print("YNEOS"["".join(sorted(input().split()))!="557"::2])

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())
# 5が2つ、7が1つあれば良い
# ５があるとき＋１して７があるとき＋２にする
# 合計が４なればYES、そうでないならNO
sum = 0
if a == 5:
    sum += 1
elif a == 7:
    sum += 2

if b == 5:
    sum += 1
elif b == 7:
    sum += 2

if c == 5:
    sum += 1
elif c == 7:
    sum += 2

if sum == 4:
    print('YES')
else:
    print(('NO'))

Submission status: Accepted

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