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 sys
input = lambda: sys.stdin.readline().rstrip()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 整数の入力
a, b, c = map(int, input().split())
# 合計17でないときNOを出力
if not (a+b+c == 17):
    print("NO")
    exit()
# 7を含まないときNOを出力
if not 7 in (a, b, c):
    print("NO")
    exit()
# 5を含まないときNOを出力、それ以外はYESを出力
if not 5 in (a, b, c):
    print("NO")
    exit()
else:
    print("YES")

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

Submission status: Accepted

Solution code:
x = input().split()
fn = 0
sn = 0
 
for i in range(len(x)):
  if int(x[i]) == 5:
    fn += 1
  elif int(x[i]) == 7:
    sn += 1
 
if fn == 2:
  if sn == 1:
    print("YES")
  else:
    print("NO")
else:
  print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

def answer(a: list) -> str:
    a = sorted(a)
    if a == [5, 5, 7]:
        return 'YES'
    else:
        return 'NO'

print(answer(a))

Submission status: Accepted

Solution code:
from sys import stdin, stdout
from time import perf_counter

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

# import sys
# sys.stdout = open("e:/cp/output.txt","w")
# sys.stdin = open("e:/cp/input.txt","r")
l=sorted(map(int,input().split()))
print("YES" if l == [5,5,7] else "NO")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == "__main__":
    str_list = list(map(int, input().split()))
    if sum(str_list) == 17:
        print('YES')
    else:
        print('NO')

Submission status: Accepted

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

if __name__ == "__main__":
    # str_list = [map(int, input().split())]
    # if str_list.count(5) == 2 and str_list.count(7) == 1:
    #     print('YES')
    # else:
    #     print('NO')
    str_list = list(map(int, input().split()))
    if sum(str_list) == 17:
        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:
a,b,c = map(int,input().split())
abclist = [a,b,c]
if abclist.count(5) == 2:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
# coding:UTF-8
import sys


def resultSur97(x):
    return x % (10 ** 9 + 7)


if __name__ == '__main__':
    # ------ 入力 ------#
    # 1行入力
    aList = list(map(int, input().split()))     # スペース区切り連続数字

    x = 5

    # ------ 処理 ------#
    c5 = 0
    c7 = 0
    for a in aList:
        if a == 5:
            c5 += 1
        elif a == 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())
b5=0
b7=0
if a==5:
  b5+=1
if a==7:
  b7+=1
if b==5:
  b5+=1
if b==7:
  b7+=1
if c==5:
  b5+=1
if c==7:
  b7+=1
if b5==2 and b7==1:
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

if li.count(5)>=2:
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
x = list(map(int, input().split()))
x.sort()
f = True
for i, e in enumerate(x):
    tmp = 5
    if i == 2:
        tmp = 7

    f &= (tmp == e)
print("YES" if f else "NO")

Submission status: Accepted

Solution code:
li = list(map(int, input().split()))
count5 = count7 = 0
for l in li:
    if l == 5:
        count5 += 1
    elif l == 7:
        count7 += 1
    else:
        print("NO")
        exit()
if count5 == 2 and count7 == 1:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
array = list(map(int,input().split()))
cnt5 = 0
cnt7 = 0
for i in array:
  if i == 5:
    cnt5 += 1
  if i == 7:
    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:
    print('YES')
  elif b == 7 and c == 5:
    print('YES')
  else:
    print('NO')
else:
  if 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 = list(map(int, input().split()))
cnt_five = 0
cnt_seven = 0

for i in range(3):
    if (a[i] == 5):
        cnt_five += 1
    if (a[i] == 7):
        cnt_seven += 1

if(cnt_five == 2 and cnt_seven == 1):
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
#ABC042A
x = list(input().split())
print("YES" if x.count("5")==2 and x.count("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 = 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()))
cnt_5 = 0
cnt_7 = 0

for i in a:
  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:
import sys
from heapq import heappush, heappop, heapify
import math
from math import gcd
import itertools as it
from collections import deque 

input = sys.stdin.readline

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

INF = 1001001001

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

def main():
    A = inpl()
    A.sort()
    if A[0]==A[1]==5 and A[2]==7:
        print("YES")
    else:
        print("NO")

main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin, stdout
from time import perf_counter

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

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

Submission status: Accepted

Solution code:
from sys import stdin, stdout
from time import perf_counter

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


l= sorted(map(int, input().split()))

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def haiku(A,B,C):

    list = [A,B,C]

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

A,B,C = (int(x) for x in input().split())
haiku(A,B,C)

Submission status: Accepted

Solution code:
re = 0
er = 0
for i in str(input()):
  if i == '5':
    re += 1
  if i == '7':
    er += 1
    
if re == 2 and er == 1:
  print('YES')
  
else:
  print('NO')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin, stdout
from time import perf_counter

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


l = [int(item) for item in input().split()]

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

Submission status: Accepted

Solution code:
from sys import stdin, stdout
from time import perf_counter

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


l =sorted([int(item) for item in input().split()])
print("YES" if l == [5,5,7] else "NO")

Submission status: Accepted

Solution code:
import sys
import math

#https://atcoder.jp/contests/agc008/submissions/15248942
sys.setrecursionlimit(10 ** 8)
ini = lambda: int(sys.stdin.readline())
inm = lambda: map(int, sys.stdin.readline().split())
inl = lambda: list(inm())
ins = lambda: sys.stdin.readline().rstrip()
debug = lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw))
a = inl()
five = 0
seven = 0
for c in a:
    if c == 5:
        five += 1
    elif c == 7:
        seven+= 1
if five == 2 and seven == 1:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=str(input())
alist=list(a)
count7=0
count5=0
for x in alist:
    if x=="7":
        count7+=1
    if x=="5":
        count5+=1
    else:
        pass
if count7==1 and count5==2:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# 042a

def atc_042a(input_value: str) -> str:
    ABC = input_value.split(" ")
    if ABC.count("5") == 2 and ABC.count("7") == 1:
        return "YES"
    return "NO"

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

Submission status: Accepted

Solution code:
from collections import Counter
L=Counter(list(map(int,input().split())))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()

def main():
    a, b, c = map(int, input().split())
    if a == 5 and b == 5 and c == 7:
        print("YES")
        return
    if b == 5 and c == 5 and a == 7:
        print("YES")
        return
    if c == 5 and a == 5 and b == 7:
        print("YES")
        return
    print("NO")


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
abc = list(map(int,input().split()))
ans = "NO"
if 5 in abc:
  abc.remove(5)
  if 5 in abc and 7 in abc:
    ans = "YES"

print(ans)

Submission status: Accepted

Solution code:
a = 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())

N5=0
N7=0

if a==5:
  N5 +=1
elif a==7:
    N7 +=1

if b==5:
  N5 +=1
elif b==7:
    N7 +=1
    
if c==5:
  N5 +=1
elif c==7:
    N7 +=1
    
if (N5==2)*(N7==1):
  print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
a,b,c=map(int,input().split())
if a*b*c==256:
    print("YES")

if a*b*c==5*5*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:
A, B, C = [int(x) for x in input().split()]
req_fives = 2
req_seven = 1
for x in (A, B, C):
    if x == 5:
        req_fives -= 1
    elif x == 7:
        req_seven -= 1
if req_fives == 0 & req_seven == 0:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

if '5' in three_num_list:
    three_num_list.remove('5')
    two_num_list = three_num_list
    if '5' in two_num_list and '7' in two_num_list:
        print('YES')
    else:
        print('NO')
else:
    print('NO')

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:
data=list(input().split())
a=0
b=0
for i in range(0,3):
    if data[i]=='5':
        a=a+1
    elif data[i]=='7':
        b=b+1
if (a==2 and b==1):
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
from sys import stdin
input = stdin.readline

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

T = [5,5,7]

for l in L:
    if l in T:
        T.pop(T.index(l))
if T:
    print('NO')
else:
    print('YES')

Submission status: Accepted

Solution code:
a=input().replace('5','');print('NYOE S'[a.count('7')==1::2])

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())
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:
ll = sorted(map(int, input().split()))
ans = [5, 5, 7]

print('YES' if ll == ans else 'NO')

Submission status: Accepted

Solution code:
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    x = list(map(int, readline().split()))

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

b=a[0]+a[1]+a[2]
c=a[2]-a[1]-a[0]

if b==17 and (c==-7 or c==-3):
  
  print('YES')

else:
  print('NO')

Submission status: Accepted

Solution code:
from sys import stdin, stdout
from time import perf_counter

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

# import sys
# sys.stdout = open("e:/python/cp/output.txt","w")
# sys.stdin = open("e:/python/cp/input.txt","r")

l = sorted([int(item) for item in input().split()])
print("YES" if l == [5,5,7] else "NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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

Submission status: Accepted

Solution code:
a,b,c=map(int,input().split())
if((a*b*c)%7==0)and((a*b*c)/7==25):
	print("YES")
else:
  	print("NO")

Submission status: Accepted

Solution code:
l = list(map(int, input().split()))
seven = 0
five = 0
for i in l:
    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:
if "".join(sorted(input().split())) == "557":
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

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

main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c = map(int,input().split())
A = [a,b,c]
B = [a,b,c]
A = A.count(5)
B = B.count(7)
if A == 2 and B == 1:
  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:
# bsdk idhar kya dekhne ko aaya hai, khud kr!!!
# import math
# from itertools import *
# import random
# import calendar
# import datetime
# import webbrowser

# f = open("input.txt", 'r')
# g = open("output.txt", 'w')
# n, m = map(int, f.readline().split())

#!/usr/bin/env python
from __future__ import division, print_function

import os
import sys
from io import BytesIO, IOBase

if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip


def main():
    pass


# region fastio

BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

input = lambda: sys.stdin.readline().rstrip("\r\n")

# endregion


def main():
    arr = list(map(int, input().split()))
    arr.sort()
    if arr[0] == 5 and arr[1] == 5 and arr[-1] == 7:
        print("YES")
    else:
        print("NO")


if __name__ == "__main__":
    main()

Submission status: Accepted

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

for i in range(3):
  s+=a[i]
  
if s!=17:
  print('NO')
  sys.exit()
  
else:
  for t in range(3):
    if a[t]==5:
      f+=1
      
if f==2:
  print('YES')
  

else:
  print('NO')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

L.sort()

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

Submission status: Accepted

Solution code:
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
l = LI()
if l.count(5) == 2 and l.count(7) == 1:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
b = a.count(5)
c = a.count(7)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print 'YES' if sorted(map(int, raw_input().split())) == [5,5,7] 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:
#
# abc042 a
#

import sys
from io import StringIO
import unittest


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """5 5 7"""
        output = """YES"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """7 7 5"""
        output = """NO"""
        self.assertIO(input, output)


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


if __name__ == "__main__":
    # unittest.main()
    resolve()

Submission status: Accepted

Solution code:
num_list = [int(x) for x in input().split()]
if num_list == [5, 5, 7] or num_list == [5, 7, 5]  or num_list == [7, 5, 5]:
    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:
a,b,c = (int(x) for x in input().split())

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

Submission status: Accepted

Solution code:
def main():
    abc = ''.join(sorted(input().replace(' ', '')))
    print('YES' if abc == '557' else 'NO')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
l = sorted(list(map(int, input().split())))

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

Submission status: Accepted

Solution code:
str_line = input().split(" ")
num_line = [int(n) for n in str_line]

num_line.sort()
#print(num_line)

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

Submission status: Accepted

Solution code:
a,b,c=input().split()
ls=[a,b,c]
ls.sort()
if ls[0]==ls[1]=="5" and ls[2]=="7":
  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,B,C = map(int,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 and C == 5:
        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 = list(map(int, input().split()))

success_cases = [(a[0], a[1], a[2]), (a[1], a[2], a[0]), (a[2], a[0], a[1])]

for c in success_cases:
    if c == (5,7,5):
        print("YES")
        exit(0)
print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if arr.count(5) == 2 and arr.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:
ls = [int(s) for s in input().split(" ")]
prels = [[5,7,5],[5,5,7],[7,5,5]]
if ls in prels:
  print("YES")
else :print("NO")

Submission status: Accepted

Solution code:
ans = []
A, B, C = map(int, input().split())
ans.append(A)
ans.append(B)
ans.append(C)
if ans.count(5) == 2 and ans.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')

Submission status: Accepted

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

Submission status: Accepted

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

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:
a,b,c =map(int,input().split() )
d = a + b + c
e = a * b * c
if(d == 17 and e == 175):
    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:
l = list(map(int, input().split()))
l.sort()
if l == [5, 5, 7]:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
# list に入力を格納
list = list(map(int, input().split()))
# 小さい順に並び替え
list.sort()

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