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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
cmd = list( map( int, input( ).split( )))
cnt5 = 0
cnt7 = 0
for i in range( len( cmd)):
  if cmd[i] == 5:
    cnt5 +=1
  elif cmd[ i] == 7:
    cnt7 += 1
if cnt5 == 2 and cnt7 == 1:
  print( "YES")
else:
  print( "NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = input().split()
sums = 0
for i in a:
    sums += int(i)

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

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:
A,B,C = map(int,input().split())
b_5 = 0
b_7 = 0
if A == 5:
  b_5 += 1
elif A == 7:
  b_7 += 1
if B == 5:
  b_5 +=1
elif B==7:
  b_7 += 1
if C==5:
  b_5 +=1
elif C==7:
  b_7 += 1

if b_5 == 2 and b_7 == 1:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
# coding: utf-8

input_ = input().split()

count_5 = 0
count_7 = 0

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

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

Submission status: Accepted

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

Submission status: Accepted

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

if s_list.count(5)==2 and s_list.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:
  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,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 a == 5 and b == 5:
    print("YES")
  else:
    print("NO")
else:
  print("NO")

Submission status: Accepted

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

flag_5 = flag_7 = 0

for i in l:
    if i == 5:
        flag_5 += 1
    if i == 7:
        flag_7 += 1

if flag_5 == 2 and flag_7 == 1:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
import sys
import math
import collections
import heapq

def set_debug(debug_mode=False):
    if debug_mode:
        fin = open('input.txt', 'r')
        sys.stdin = fin


def int_input():
    return list(map(int, input().split()))


if __name__ == '__main__':
    # set_debug(True)

    # t = int(input())
    t = 1

    for ti in range(1, t + 1):
        a, b, c = int_input()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if int(input_line[0]) + int(input_line[1]) + int(input_line[2]) != 17:
    print("NO")
    pass
elif input_line[0] == input_line[1] == "5":
    print("YES")
    pass
elif input_line[1] == input_line[2] == "5":
    print("YES")
    pass
elif input_line[0] == input_line[2] == "5":
    print("YES")
    
else:
    print("NO")

Submission status: Accepted

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

m = {5: 0, 7: 0}
m[a] = m[a] + 1
m[b] = m[b] + 1
m[c] = m[c] + 1
if m[5] == 2 and m[7] == 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==7 and b==5 and c==5:
    print("YES")
elif a==5 and b==7 and c==5:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
#入力
lst = input().split()
 
#整数値化
for i in range(len(lst)):
  lst[i] = int(lst[i])
 
#ソート
lst.sort()
 
#出力
if lst == [5, 5, 7]:
  print('YES')
else:
  print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B,C=map(int,input().split())
n5=0
n7=0
if A==7:
  n7 += 1
elif A==5:
  n5 += 1
if B==7:
  n7 += 1
elif B==5:
  n5 += 1
if C==7:
  n7 += 1
elif C==5:
  n5 += 1

if n5==2 and n7==1:
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

counter_5 = 0
counter_7 = 0

for i in range(len(a)):
  if a[i] == 5:
    counter_5 += 1
  if a[i]== 7:
    counter_7 += 1

if counter_5 == 2 and counter_7 ==1:
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
a = input()
a = [int(i)for i in a.split(" ")]
print("YES" if (a[0] == 5 or a[0] == 7) and (a[1] == 5 or a[1] == 7) and (sum(a) == 17) else "NO")

Submission status: Accepted

Solution code:
a, b, c = input().split()
if int(a)*int(b)*int(c) == 175:
  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('YNEOS'['7 7'in input()::2])

Submission status: Accepted

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

seven = 0
five = 0

for i in range(len(data)):
	if int(data[i]) == 7:
		seven += 1
	elif int(data[i]) == 5:
		five +=1

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

Submission status: Accepted

Solution code:
n = list(int(i) for i in input().split())

n.sort()

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
#abc042
a, b, c=map(int, input().split())

A=[a,b,c]

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

Submission status: Accepted

Solution code:
from fractions import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
x = list(map(int,input().split()))
 
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 == 5 or a== 7):
    if(b == 5 or b == 7):
        if(c == 5 or c == 7):
            if(a + b + c == 17):
                print("YES")
            else:
                print("NO")
        else:
            print("NO")
    else:
        print("NO")
else:
    print("NO")

Submission status: Accepted

Solution code:
# coding:utf-8


def main():
    haiku = [5, 7, 5]
    word_num = input().split(' ')
    for num in word_num:
        try:
            haiku.remove(int(num))
        except:
            return 'NO'
    return 'YES'


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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

Submission status: Accepted

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

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

count_5 = 0
count_7 = 0

if A == 5:
  count_5 += 1
elif A == 7:
  count_7 += 1
  
if B == 5:
  count_5 += 1
elif B == 7:
  count_7 += 1
  
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())

count_5 = 0
count_7 = 0

if A == 5:
  count_5 += 1
elif A == 7:
  count_7 += 1
  
if B == 5:
  count_5 += 1
elif B == 7:
  count_7 += 1
  
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:
ABC=list(map(int,input().split()))
if ABC.count(5)==2 and ABC.count(7)==1:
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
answer = 'NO'
if set([5,7]) == set(a):
  if len([i for i in a if i == 5]) == 2:
    answer = 'YES'
print(answer)

Submission status: Accepted

Solution code:
import itertools
ABC = list(map(str, input().split()))

list_ = list(itertools.permutations(ABC))

if ('5', '7', '5') in list_:
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10**9)
mod = 10**9+7

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from sys import stdin

A,B,C = [int(x) for x in stdin.readline().rstrip().split()]

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

Submission status: Accepted

Solution code:
def actual(A, B, C):
    if (A, B, C) in [(5, 5, 7), (5, 7, 5), (7, 5, 5)]:
        return 'YES'

    return 'NO'

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

Submission status: Accepted

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

l = list(map(int, input().split()))
l_s = sorted(l)
l_r = [5, 5, 7]

if l_s == l_r:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
a,b,c=map(int,input().split());print(['NO','YES'][max(a,b,c)==7 and (a+b+c)-max(a,b,c)==10])

Submission status: Accepted

Solution code:
A, B, C = map(int, input().split())
fsf = [A, B, C]
if (fsf.count(5) == 2) & (fsf.count(7) == 1):
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

a = str(A)
b = str(B)
c = str(C)

d = a+b+c

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = 3

a, b, c = [int(N) for N in input().split() ]

d = 17

mylist = [5, 7]

if ( a in mylist and b in mylist and c in mylist and a + b + c == 17 ):
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

s = A, B, C
print('YES') if s.count(5) == 2 and s.count(7) == 1 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 = list(map(int,input().rstrip().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())
print("YNEOS"[a*b*c!=175::2])

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

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
nums = list(map(int, input().split()))  # n個の数字がリストに格納される
cnt_5 = 0
cnt_7 = 0
for i in nums:
    if i == 5:
        cnt_5 += 1
    if i == 7:
        cnt_7 += 1
if cnt_5 == 2 and cnt_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:
# coding: utf-8
# Your code here!

lst = list(map(int,input().split()))
#print(lst)
count5 = 0
count7 = 0
for i in lst:
    if i == 5:
        count5+=1
    elif i == 7:
        count7+=1

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

Submission status: Accepted

Solution code:
a,b,c=(int(x) for x in input().split())
mylist=[a,b,c]
if mylist.count(5) == 2:
    if mylist.count(7) == 1:
        print('YES')
    else:
        print('NO')
else:
    print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a = sorted(list(map(int, input().split())), reverse=True)
if a[0]==7 and a[1]==5 and a[2]==5:
    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:
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:
ls = list(map(int,input().split()))
if ls.count(5) == 2 and ls.count(7) == 1:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
s = list(map(int, input().split()))
count5 = 0
count7 = 0
for i in s:
  if i == 5:
    count5+=1
  else:
    count7+=1

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

else:
  print("NO")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b, c = 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())
l=[a,b,c]
l.sort()
if l==[5,5,7]:
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!python3

LI = lambda: list(map(int, input().split()))

# input
l = LI()


def main():
    d = {i: 0 for i in range(11)}
    for x in l:
        d[x] += 1
    if d[5] == 2 and d[7] == 1:
        ans = "YES"
    else:
        ans = "NO"
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

d5 = 0
d7 = 0

for i in n:
    if i == 5:
        d5 += 1
    elif i == 7:
        d7 += 1
 
if d5 == 2 and d7 == 1:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

nana = 0
go = 0

for i in n:
    if i == 5:
        go +=1
    elif i ==7:
        nana +=1

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import numpy as np
import random
from decimal import Decimal
import itertools
import re
import bisect
from collections import deque, Counter
from functools import lru_cache

sys.setrecursionlimit(10**9)
INF = 10**13
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
def SERIES(n): return np.fromstring(sys.stdin.buffer.read(), dtype=np.int32, sep=' ')
def GRID(h,w): return np.fromstring(sys.stdin.buffer.read(), dtype=np.int32, sep=' ').reshape(h,-1)[:,:w]
def GRIDfromString(h,w): return np.frombuffer(sys.stdin.buffer.read(), 'S1').reshape(h,-1)[:,:w]
MOD = 1000000007

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





if __name__ == '__main__':
    main()

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:
'''     ##     ##  #######  # #  ######
        ##     ##  ##   ##  ###    ##
        ##     ##  ##    #  # #    ##
        #########  #######  # #    ##    '''

import sys
import math
# sys.setrecursionlimit(10**6)

def get_ints(): return map(int, input().strip().split())
def get_list(): return list(get_ints())

def printspx(*args): return print(*args, end="")
def printsp(*args): return print(*args, end=" ")
def printchk(*args): return print(*args, end=" \ ")

MODPRIME = int(1e9+7); BABYMODPR = 998244353;

ONLINE_JUDGE = 1
if not ONLINE_JUDGE:
    sys.stdin = open("input.txt","r")  # <<<  Comment this line  >>> #
    sys.stdout = open("output.txt","w")  # <<<  Comment this line  >>> #
    sys.stderr = open("output.txt","w")  # <<<  Comment this line  >>> #

# for _testcases_ in range(int(input())):
li = get_list()
if sorted(li) == [5, 5, 7]:
    print("YES")
else:
    print("NO")
'''
>>> COMMENT THE STDIN!! CHANGE ONLINE JUDGE !!
THE LOGIC AND APPROACH IS BY ME @luctivud ( UDIT GUPTA )
SOME PARTS OF THE CODE HAS BEEN TAKEN FROM WEBSITES LIKE::
(I Own the code if no link is provided here or I may have missed mentioning it)
DO NOT PLAGIARISE.
TESTCASES:
>>> COMMENT THE STDIN!! CHANGE ONLINE JUDGE !!
'''

Submission status: Accepted

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

A.sort()
if A[0] == 5:
    if A[1] == 5:
        if A[2] == 7:
            print("YES")
            exit()
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:
def main():
  lst = input()
  lst = lst.split()
  lst.sort()
  if lst == ['5','5','7']:
    print("YES")
  else:
    print("NO")

main()

Submission status: Accepted

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

Submission status: Accepted

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


if abc == (5, 5, 7):
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

if num_list.count(5) == 2 and num_list.count(7) == 1:
    print("YES")

else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:



def main():
    input_str = input()

    a,b,c = input_str.split(' ')
    a = int(a)
    b = int(b)
    c = int(c)
    flag = False

    for i in [a,b,c,'fin']:
        if i == 'fin':
            if a+b+c== 17:
                flag = True
        elif not i in [5,7]:
            break

    if flag:
        print('YES')
    else:
        print('NO')


if __name__=='__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

import sys
  
if sorted(sys.stdin.readline().split()) == ['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)
if a == 5:
  if (b== 7 and c==5) or (b== 5 and c==7):
    print("YES")
  else:
    print("NO")
elif a == 7:
  if b==5 and c == 5:
    print("YES")
  else:
    print("NO")
else:
    print("NO")

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
f_inf = float('inf')
mod = 10 ** 9 + 7


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

if __name__ == '__main__':
    resolve()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B, C = map(int, input().split())
five = 0
seven = 0
if A == 5:
  five += 1
if A == 7:
  seven += 1

if B == 5:
  five += 1
if B == 7:
  seven += 1

if C == 5:
  five += 1
if C == 7:
  seven += 1
  
if five == 2 and seven == 1:
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

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

Submission status: Accepted

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

if S.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()
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()))
fc=0
sc=0

for num in range(3):
    if (a[num]==5):
        fc=fc+1
    elif(a[num]==7):
        sc=sc+1

if (fc==2 and sc==1):
    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:
l=list(map(int,input().split()))
if l.count(5)==2 and l.count(7)==1 and len(l)==3:
    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 = 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:
A, B, C = map(int,input().split())
list = [A,B,C]
if 5 in list:
    d = list.index(5)
    list[d] = 0

    if 5 in list:
        e = list.index(5)
        list[e] = 0

        if 7 in list:
            print("YES")

        else:
            print("NO")

    else:
        print("NO")

else:
    print("NO")

Submission status: Accepted

Solution code:
x=[int(i) for i in input().split()]
y=[0,0]
for ele in x:
    if ele==5: y[0]+=1
    elif ele==7: y[1]+=1
    else: continue
if y[0]==2:
    if y[1]==1:
        print('YES')
    else:
        print('NO')
else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

lis=[A,B,C]

def hantei(list):
    if int(list[0]) == 7:
        if int(list[1]) == 5 and int(list[2]) == 5:
            return True
    if int(list[1]) == 7:
        if int(list[0]) == 5 and int(list[2]) == 5:
            return True
    if int(list[2]) == 7:
        if int(list[0]) == 5 and int(list[1]) == 5:
            return True

if hantei(lis) == True:
    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:
l,m,n = map(int, input().split())
newlist = sorted([l,m,n])
if newlist[0]==5 and newlist[1]==5 and newlist[2]==7:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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