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

Solution (Python):
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")

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

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

Solution (Python):
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")

Solution (Python):
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")

Solution (Python):
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__':
    

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

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

Solution (Python):
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")

Solution (Python):
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")

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

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

Solution (Python):
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")

Solution (Python):
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")

Solution (Python):
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")

Solution (Python):

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

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

Solution (Python):

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

Solution (Python):
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")

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

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

Solution (Python):
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')

Solution (Python):
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")

Solution (Python):
a, b, c = input().split()
if int(a)*int(b)*int(c) == 175:
  print("YES")
else:
  print("NO")

Solution (Python):
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")

Solution (Python):
print('YNEOS'['7 7'in input()::2])

Solution (Python):
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')

Solution (Python):
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")

Solution (Python):


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

Solution (Python):
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()

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

Solution (Python):
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")

Solution (Python):



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)

Solution (Python):
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")

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

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

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

Solution (Python):
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")

Solution (Python):
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")

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

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

Solution (Python):
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)

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

list_ = list(itertools.permutations(ABC))

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

Solution (Python):
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')

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

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

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

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

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

Solution (Python):
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()

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

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

Solution (Python):
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")

Solution (Python):
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))

Solution (Python):


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

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

Solution (Python):
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")

Solution (Python):
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")

Solution (Python):
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')

Solution (Python):
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")

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

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

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

Solution (Python):
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()

Solution (Python):
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")

Solution (Python):
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")

Solution (Python):
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')

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

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

Solution (Python):
a,b,c=map(int,input().split())
print("YNEOS"[a*b*c!=175::2])

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

Solution (Python):
ABC_list = input().split()

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

Solution (Python):


nums = list(map(int, input().split()))  
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")

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

Solution (Python):



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

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

Solution (Python):
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')

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

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

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

Solution (Python):
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')

Solution (Python):
line = input()

if line == "5 5 7" or line == "5 7 5" or line == "7 5 5":
    print("YES")
else:
    print("NO")

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

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

Solution (Python):
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")

Solution (Python):
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")

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

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

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

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

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

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

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

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

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

Solution (Python):


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


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

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

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

Solution (Python):
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")

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

Solution (Python):
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")

Solution (Python):
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")

Solution (Python):
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()

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

Solution (Python):
'''     
        
        
        

import sys
import math


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")  
    sys.stdout = open("output.txt","w")  
    sys.stderr = open("output.txt","w")  


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 !!
'''

Solution (Python):
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")

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

Solution (Python):
def main():
  lst = input()
  lst = lst.split()
  lst.sort()
  if lst == ['5','5','7']:
    print("YES")
  else:
    print("NO")

main()

Solution (Python):
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")

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


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

Solution (Python):
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')

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

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

else:
    print("NO")

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

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

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

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

Solution (Python):
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)

Solution (Python):



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

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

Solution (Python):


import sys
  
if sorted(sys.stdin.readline().split()) == ['5', '5', '7']:
  print('YES')
else:
  print('NO')

Solution (Python):
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")

Solution (Python):
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()

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

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

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

Solution (Python):
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")

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

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

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

Solution (Python):
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')

Solution (Python):
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")

Solution (Python):
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')

Solution (Python):
A,B,C=map(int,input().split())
if A+B+C==17:
  print('YES')
else:
  print('NO')

Solution (Python):
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')

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

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

Solution (Python):
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")

Solution (Python):
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")

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

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

Solution (Python):
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")

Solution (Python):
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')

Solution (Python):
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')

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

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

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

Solution (Python):
A, B, C = list(map(int, input().split()))
arr = []
ideal = [5,5,7]

arr.append(A)
arr.append(B)
arr.append(C)

arr = sorted(arr)

if arr == ideal:
  print("YES")
else:
  print("NO")

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

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

Solution (Python):
import sys

for line in sys.stdin :

  list = line.split(" ")
  
  for n in range(len(list)) : 
    list[n] = int(list[n])
   
  
list.sort()

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

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

Solution (Python):

import sys

YES = "YES"  
NO = "NO"  


def solve(A: int, B: int, C: int):
    five_a_seven = {5, 7}
    abc = {A, B, C}
    if(five_a_seven & abc == five_a_seven and A+B+C == 17):
        print(YES)
        return YES
    else:
        print(NO)
        return NO



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  
    B = int(next(tokens))  
    C = int(next(tokens))  
    solve(A, B, C)


if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
A,B,C=map(int,input().split())
x=[A,B,C]
y=sorted(x)

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

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

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

Solution (Python):
import collections
s= input().split()
li = collections.Counter(s)
if (li["5"] ==2) &(li["7"] ==1):
    print("YES")
else:
    print("NO")

Solution (Python):


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

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

Solution (Python):
numbers=input()

numbers_list=numbers.split(' ')

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

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

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

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

Solution (Python):
a, b, c = map(int, input().split())
f = 0
s = 0
if a==5:f = f+1
if a==7:s = s+1
if b==5:f = f+1
if b==7:s = s+1
if c==5:f = f+1
if c==7:s = s+1
if f==2 and s==1:
    print("YES")
else:
    print("NO")

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

Solution (Python):
a=[int(x) for x in input().split()]
count=0
if 7 in a:
  for i in a:
    if i == 5:
      count+=1
if count==2:
  print('YES')
else:
  print('NO')

Solution (Python):
s=list(map(int,input().split()))
frag="YES"
if max(s)!=7:
  frag="NO"
elif min(s)!=5:
  frag="NO"
elif s.count(5)!=2:
  frag="NO"
print(frag)

Solution (Python):
N=[int(i) for i in input().split(" ")]

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

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

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

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

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

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

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

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

Solution (Python):
a,b,c=map(int,input().split())
d=0
if a==5 or b==5 or c==5:
  if a==7 or b==7 or c==7:
    if a+b+c==17:
      print("YES")
      d=1
if d==0:
  print("NO")

Solution (Python):
class A:

    def solve(self):
        [a, b, c] = sorted([int(x) for x in input().split(" ")])
        if a == 5 and b == 5 and c == 7:
            print("YES")
        else:
            print("NO")

A().solve()

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

Solution (Python):
A,B,C= input().split()
Sum = int(A) + int(B) + int(C)
if Sum == 17:
    print('YES')
else:
    print('NO')

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

Solution (Python):
A = [int(i) for i in input().split()]

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

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

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