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:
n, b, c = (int(_) for _ in input().split())
a = [n, b, c]
if a == [5, 7, 5] or a == [5, 5, 7] or a == [7, 5, 5]:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
X, Y, Z = map(int, input().split())
 
num_5 = 0
num_7 = 0
 
if X == 5:
  num_5 += 1
if Y == 5:
  num_5 += 1
if Z == 5:
  num_5 += 1
  
if X == 7:
  num_7 += 1
if Y == 7:
  num_7 += 1
if Z == 7:
  num_7 += 1
  
if num_5 == 2 and num_7 == 1:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
input=stdin.readline().rstrip().split()
for i in range(len(input)):
  input[i]=int(input[i])

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
b = 0
c = 0
for i in a:
  if i == 7:
    b += 1
  elif i == 5:
    c += 1

if b == 1 and c == 2:
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

if a == 5 and b == 7 and c == 5 \
        or a == 5 and b == 5 and c == 7 \
        or a == 7 and b == 5 and c == 5:
    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 = sorted([int(i) for i in input().split()])
if a == [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 = input().replace(' ','')
if s=='575' or s=='755' or s=='557':
  print('YES')
else:
  print('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:
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:
from sys import stdin
a = stdin.readline().rstrip()
a.count('5')
if a.count('5') == 2:
  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 input() in ("5 7 5","5 5 7","7 5 5") else print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

l = sorted([a,b,c])

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

else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input().split();print('YNEOS'[s.count('7')!=1 or s.count('5')!=2::2])

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())
 
x = []
x.append(a)
x.append(b)
x.append(c)
 
y = [5, 7, 5]
for z in y:
    if z in x:
        x.remove(z)
 
if len(x) == 0:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

x = []
x.append(a)
x.append(b)
x.append(c)

y = [5, 7, 5]
for z in y:
    if z in x:
        x.remove(z)

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

Submission status: Accepted

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

x = []
x.append(a)
x.append(b)
x.append(c)

if 7 in x:
    x.remove(7)
    if 5 in x:
        x.remove(5)
        if 5 in x:
            print('YES')
            exit()

print('NO')

Submission status: Accepted

Solution code:
def main():
    s = list(map(int, input().split()))
    a, b = 0, 0
    for i in s:
        if i == 7:
            a += 1
        if i == 5:
            b += 1
    if b == 2 and a == 1:
        print('YES')
    else:
        print('NO')

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def iroha_and_haiku(A: int, B: int, C: int) -> bool:
    return [5, 5, 7] == sorted([A, B, C])


if __name__ == "__main__":
    A, B, C = map(int, input().split())
    yes = iroha_and_haiku(A, B, C)
    print('YES' if yes else 'NO')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
if input() in ('5 5 7', '5 7 5', '7 5 5') :
  print('YES')
else :
  print('NO')

Submission status: Accepted

Solution code:
print('YES') if input() in ('7 5 5', '5 7 5', '5 5 7') else print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

cnt_5 = 0
cnt_7 = 0
for x in [A, B, C]:
    if x == 5:
        cnt_5 += 1
    if x == 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()))
count5=0
count7=0

for i in range(0,3):
  if a[i]==5:
    count5 += 1
  elif a[i]==7:
    count7 += 1
  else:
    i += 1

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

Submission status: Accepted

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

Submission status: Accepted

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

arr = [A, B, C]
fives = 0
sevens = 0

for num in arr:
    if num == 5:
        fives += 1
    if num == 7:
        sevens += 1

if fives == 2 and sevens == 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:
    print("YES")
elif a==c==5 and b==7:
    print("YES")
elif b==c==5 and a==7:
    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 = [int(i) for i in input().split()]
if ((a.count(5) == 2) & (a.count(7) == 1)):
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

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

x.sort() 
if x == [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 list == [5,5,7]:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
haiku = list(input().split())
haiku = [int(i) for i in haiku]
haiku.sort()
if haiku == [5, 5, 7]:
    print('YES')
else:
    print('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:
s=str(input())
n5=s.count('5')
n7=s.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 + B + C == 17:
    print("YES")
else:print("NO")

Submission status: Accepted

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

five_cnt = 0
seven_cnt = 0


for i in A :
    if i == 5:
        five_cnt += 1
    if i == 7:
        seven_cnt += 1


if five_cnt == 2 and seven_cnt == 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 = [int(x) for x in input().split()]

b = a.count(5)
c = a.count(7)

print("YES" if b == 2 and c ==1 else "NO")

Submission status: Accepted

Solution code:
from sys import stdin
input = stdin.readline
ABC = [int(x) for x in input().rstrip().split()]
ABC.sort()
if ABC == [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 = sorted(list(map(int,input().split())))
print('YES' if (sum(A) == 17) and (A[0]==A[1]==5) else 'NO')

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS(): return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
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)]
mod = 1000000007


#A
a = LI()
i = a.count(5)
j = a.count(7)
if i == 2 and j == 1:
    print("YES")
else:
    print("NO")
#B

#C
"""
def check(n):
    n = list(map(int,list(str(n))))
    s = 0
    for i in n:
        s += f[i]
    return s == 0
n,k = LI()
d = LI()
f = [0 for i in range(10)]
for i in d:
    f[i] = 1
while 1:
    if check(n):
        print(n)
        quit()
    n += 1
"""
#D
"""
def f(x,y):
    return fact[x-1+h-y]*fact[y-1+w-x]*inv_fact[x-1]*inv_fact[y-1]*inv_fact[w-x]*inv_fact[h-y]%mod
h,w,a,b = LI()
fact = [1]*(h+w+1)
for i in range(h+w):
    fact[i+1] = fact[i]*(i+1)%mod
inv_fact = [0]*(h+w+1)
inv_fact[h+w] = pow(fact[-1],mod-2,mod)
for i in range(h+w)[::-1]:
    inv_fact[i] = inv_fact[i+1]*(i+1)%mod
ans = 0
for i in range(1,min(w-b,h-a)+1):
    ans += f(b+i,a+i)
    ans %= mod
print(ans)
"""


#E

#F

#G

#H

#I

#J

#K

#L

#M

#N

#O

#P

#Q

#R

#S

#T

Submission status: Accepted

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

Submission status: Accepted

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

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

ABC.sort()

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

Submission status: Accepted

Solution code:
#042 A
S = [int(j) for j in input().split()]
if S.count(5)==2 and S.count(7)==1:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
from functools import reduce

def main():
    # 一文字のみを読み込み
    # s = input().rstrip().split(' ')
    
    # スペース区切りで標準入力を配列として読み込み
    # s = input().rstrip().split(' ')

    # 位置文字ずつ標準入力を配列として読み込み
    # s = list(input().rstrip())
    slist = input().rstrip().split(' ')
    if slist[0] == '5' and slist [1] == '5' and slist[2] == '7':
        print('YES')
    elif slist[0] == '5' and slist [1] == '7' and slist[2] == '5':
        print('YES')
    elif slist[0] == '7' and slist [1] == '5' and slist[2] == '5':
        print('YES')
    else:
        print('NO')
        
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
def main():
  a,b,c = map(int, input().split())
#  print("a:{},b:{},c:{}".format(a,b,c))
  if a+b+c == 17:
    s = list(set([a,b,c]))
#    print(s)
    if (s[0]==5 and s[1]==7) or (s[0]==7 & s[1]==5):
      print ("YES")
    else:
      print ("NO")
  else:
    print ("NO")

if __name__=='__main__':main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
line = map(int, input().split())
#ans = "YES" if line.count(5) == 2 and line.count(7) == 1 else "NO"

if sorted(line) == [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, B, C = map(int, input().split())

sample = [A, B, C]

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

if a.count(5) == 2 and a.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:
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 = list(map(int, input().split()))

if A*B*C==5*5*7:
	print('YES')
else:
	print('NO')

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if a + b + c == 17:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
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:
# -*- coding: utf-8 -*-
N = list(map(int, input().split()))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A = map(int, input().split(' '))
A_sum = sum(A)
if A_sum == 17:
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
# coding: UTF-8

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

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

Submission status: Accepted

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

if (num[0]*num[1]*num[2] == (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, b, c = input().split()
nums = sorted([a, b, c])
if nums[0] == nums[1] == '5' and nums[2] == '7':
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

# input
arr = input().split()
arr = map(int, arr)
haiku = [5, 7, 5]
# getans
for a in arr:
	if a in haiku:
		haiku.remove(a)
ans = 'YES' if not haiku else 'NO'
# output
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input_str = list(map(int, input().split()))
# パターンを上げる
# 5 * 5 * 7 で１通りとする（素因数分解しても１通り）
# sortして１通りとする
# print("YES" if sorted([int(i) for i in input().split()])==[5,5,7] else "NO")
if input_str == [7, 5, 5] or input_str == [5, 7, 5] or input_str == [5, 5, 7]:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
input_str = ''.join(list(map(str, input())))
if input_str == '7 5 5' or input_str == '5 7 5' or input_str == '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:
a,b,c=list(map(int,input().split()))
if a*b*c==175:
	print("YES")
else:
	print("NO")

Submission status: Accepted

Solution code:
haiku=list(map(int,input().split()))
haiku.sort()
if haiku==[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:
a=[int(x) for x in input().split()]

if 7 in a:
  a.remove(7)
  
if a==[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:
def main() -> None:
    A, B, C = map(int, input().split())
    l = [A, B, C]
    l.sort()
    if l[0] == 5 and l[1] == 5 and l[2] == 7:
        print("YES")
    else:
        print("NO")


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from itertools import combinations, product


def gcd(a, b):
    if a < b:
        a, b = b, a
    while b != 0:
        a, b = b, a % b
    return a

def lcm(a, b):
    return a * b // gcd(a, b)


def get(fmt):
    ps = input().split()
    r = []
    for p, t in zip(ps, fmt):
        if t == "i":
            r.append(int(p))
        if t == "f":
            r.append(float(p))
        if t == "s":
            r.append(p)
    if len(r) == 1:
        r = r[0]
    return r

def put(*args, **kwargs):
    print(*args, **kwargs)


def rep(n, f, *args, **kwargs):
    return [f(*args, **kwargs) for _ in range(n)]
    
def rep_im(n, v):
    return rep(n, lambda: v)
    
YES_NO = ["NO", "YES"]


v = sorted(get("iii"))
put(YES_NO[v == [5, 5, 7]])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if C < A:
    A ,C = C, A

if C < B:
    B, C = C, B

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

Submission status: Accepted

Solution code:
x = input();
cnt5=0;
cnt7=0;
for i in x:
    if i == '5':
        cnt5=cnt5+1
    else:
        if i == '7':
            cnt7=cnt7+1
if cnt5 == 2 and cnt7 == 1:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
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()))
b = a.count(5)
c = a.count(7)
if b==2 and c==1:
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

if (A[0] == 5) & (A[1] == 5) & (A[2] == 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:
A, B, C = map(int, input().split())
flag = False
if A == 7:
	if B == C and (B == 5 or C == 5):
		flag = True

elif B == 7:
	if A == C and (A == 5 or C == 5):
		flag = True

elif C == 7:
	if A == B and (A == 5 or B == 5):
		flag = True		

print("YES") if flag == True else print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B,C=map(int,input().split())
five=0
seven=0
for i in [A,B,C]:
  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:
A, B, C = map(int, input().split())
five = 0
seven = 0
for i in [A,B,C]:
    if i == 5:
        five += 1
    if i == 7:
        seven += 1

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

Submission status: Accepted

Solution code:
from sys import stdin
l = [int(x) for x in stdin.readline().rstrip().split()]
l.sort()
if l[0] == 5 and l[1] == 5 and l[2] == 7:
  print('YES')
else:
  print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
ABC = sorted([int(n) for n in input().split()])
# N = int(input())
# a = [int(input()) for _ in range(N)]
# S = str(input())
# L = len(S)
# T = str(input())
if ABC[0] == 5 and ABC[1] == 5 and ABC[2] == 7:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B, C = input().split(' ')
num_list = sorted([A, B, C])
print('YES' if num_list == ['5', '5', '7'] else 'NO')

Submission status: Accepted

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

five = 0
seven = 0

for n in [a,b,c]:
    if n == '5':
        five += 1
    elif n == '7':
        seven += 1

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = list(map(int, input().split()))
d = 0
e = 0
for i in range(3):
  f = a[i]
  if f == 7:
    d += 1
  elif f == 5:
    e += 1
  else:
    break
if d == 1 and e == 2:
  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:
l = [0]*11
r = list(map(int,input().split()))
for i in r:
  l[i] += 1
print("YES" if (l[5]==2)and(l[7]==1) 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 == 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:
a,b,c=[int(i) for i in input().split()]
print("YES" if sorted([a,b,c])==[5,5,7] else "NO")

Submission status: Accepted

Solution code:
import collections
abc = [int(i) for i in input().split()]
c = collections.Counter(abc)
if c[5] == 2 and c[7] == 1:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = input().split()
for i in range(3):
  a[i] = int(a[i])
a.sort()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
abc = map(int, input().split())
data = [0,0]
for i in abc:
  if i == 5:
    data[0] += 1
  elif i == 7:
    data[1] += 1

if data == [2,1]:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
import numpy as np
a, b, c = map(int, input().split()) 
nums = [a,b,c]
list5 = [num for num in nums if num == 5]
list7 = [num for num in nums if num == 7]
if (len(list5)==2 and len(list7)==1):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
# ABC 042 A - 和風いろはちゃんイージー / Iroha and Haiku (ABC Edition)
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()))
five_cnt=0
seven_cnt=0
for a in A:
    if a==5:
        five_cnt+=1
    elif a==7:
        seven_cnt+=1
if five_cnt==2 and seven_cnt==1:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
a=list(map(int,input().split()))
a.sort()
print("YES" if (a[0]==a[1]==5 and a[2]==7) 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:
lst = list(map(int, input().split()))
c5 = c7 = 0
for x in lst:
    if x == 5:
        c5 += 1
    elif x == 7:
        c7 += 1
if c5 == 2 and c7 == 1:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

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