peterverebics/CodeNet_Python_118 huggingface dataset:
a, b, c = map(int, input().split())

if a == 5:
  if (b == 5 and c == 7) or (b == 7 and c == 5):
    print('YES')
  else:
    print('NO')
elif b == 5:
  if (a == 5 and c == 7) or (a == 7 and c == 5):
    print('YES')
  else:
    print('NO')
elif c == 5:
  if (a == 5 and b == 7) or (a == 7 and b == 5):
    print('YES')
else:
    print('NO')
l=list(input().split())
if l.count(5)==2 and l.count(7)==1:
  print('YES')
else:
  print('NO')
from sys import stdin, stdout
from time import perf_counter

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



n = sorted([int(item) for item in input().split()])
print("YES" if n[2] == 7 else "NO")
Number=list(map(int,input().split()))
print(Number)
if Number.count(5)==2 and Number.count(7)==1:
    print('YES')
else:
    print('NO')
if sorted(map(int, input().split())) == [5, 5, 7]:
  print('Yes')
else:
  print('No')
A, B, C = map(int,input().split())

if A + B + C == 5 + 7 + 5:
    print("Yes")
else:
    print("No")
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

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

if 7 == a[0]:
    if 5 == a[1] and 5 == a[2]:
        print("YES", end="\n")
elif 5 == a[0]:
    if (7 == a[1] and 5 == a[2]) or (5 == a[1] and 7 == a[2]):
        print("YES", end="\n")
else:
    print("NO", end="\n")
s = input()
if s == "7 5 5" or "5 7 5" or "5 5 7":
  print("YES")
else:
  print("NO")
"""
author : halo2halo
date : 4, Feb, 2020
"""

import sys

# import itertools

# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

S = readline().decode('utf8').rstrip().split()

print('Yes' if S.count('5') == 2 and S.count('7') == 1 else 'No')
ar=sorted(list(map(int,input().split())))
print("Yes" if ar==[5,5,7] else "No")
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==1 and b==2):
    print('YES')
else:
    print('NO')
lst = list(map(int,input().split()))
#print(lst)
count5 = 0
count7 = 0
for i in range(len(lst)):
    if i == 5:
        count5+=1
    elif i == 7:
        count7+=1
if count7==1 and count5 ==2:
    print('YES')
else:
    print('NO')
a,b,c = map(int,input().split())

if a+b+c == 19:
  if a == 7 or a == 5:
    if b == 7 or b == 5:
      if c == 7 or c == 5:
        print("YES")
      else:
        print("NO")
def test():
  x=input()
  x=x.split()
  if x ==['5','5','7']:
    print("YES")
  if x ==['5','7','5']:
    print("YES")
  if x ==['7','5','5']:
    print("YES")
  else:
    print("NO")
test()
A, B, C = map(int, input().split())
MC = [A, B, C]
if MC.count(5)==2:
  print("Yes")
else:
  print("No")
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']:
        print(i)
        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()
def easy(A,B,C):
  if (A,B,C)==(5,7,5)or(A,B,C)==(7,5,5)or(A,B,C)==(5,5,7):
   print("Yes")
  else:
   print("No")
ABC=list(input())
if ABC.count("5")==2 and ABC.count("7")==1:
  print("yes")
else:
  print("no")
A,B,C=map(int,input().split())

iroha=[A,B,C]

if (iroha.count(5)==2) & (iroha.count(7)==1):
    print("Yes")
else:
    print("No")
a,b,c=map(int,input().split())
if a==5 and b==7 and c==5:
    print('YES')
else:
    print('NO')
a=input()
if a=="557":
    print("YES")
else:
    print("NO")
nums = input().split()
sorted(nums)
if nums[0]=='5' and nums[1]=='5' and nums[2]=='7':
  print("YES")
else: print("NO")
import sys

# 入力
a, b, c = input().split()

# 入力文字列の文字集取得
a_len, b_len, c_len = len(a), len(b), len(c)

cnt5, cnt7 = 0, 0

# 5文字と7文字がいくつあったか
if a_len == 5:
    cnt5 += 1
if a_len == 7:
    cnt7 += 1
if b_len == 5:
    cnt5 += 1
if b_len == 7:
    cnt7 += 1
if c_len == 5:
    cnt5 += 1
if c_len == 7:
    cnt7 += 1

# 判定
if cnt5 == 2 and cnt7 == 1:
    print("YES")
else:
    print("NO")
s = list(map(int, input().split()))
s.sort()
if s == [5, 7, 7]:
  print("YES")
else:
  print("NO")
A, B, C=map(int,input().split())

x = [A, B, C]

if (x.count(5) == 2) and (x.count(7) == 1):
    print("Yes")
else:
    print("No")
A, B, C = map(int, input().split())
if A*B*C == 175:
    print("Yes")
else:
    print("No")
#ABC042 A
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")
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")
num= input().split()
count5 = 0
count7 = 0
 
for i in range(len(num)):
    if num[i] == 5:
        count5 += 1
    elif num[i] == 7:
        count7 += 1
if count5 == 2 and count7 == 1:
    print('YES')
else:
    print('NO')
A = sorted(input().split())
print('Yes' if A[0]=='5' and A[1]=='5' and A[2]=='7' else 'No')
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")
else:
  print("No")
num=input()
moji=num.split(" ")
 
if int(moji[0])==7 or int(moji[0])==5:
    pass
else:
    print("NO")
    
if int(moji[1])==7 or int(moji[1])==5:
	if int(moji[0])+int(moji[1])+int(moji[2])==19:
		print("YES")
else:
	print("NO")
S = input()

print('Yes' if(S.count('5') == 2 and S.count('7') == 1) else 'No')
a=input().strip().split(" ")
b=[int(i) for i in a]
b.sort()
if b == [5,5,7]:
    print("YES")
else:
    print("NO")
print(b)
A, B, C = map(str, input().split())
ABC = str(len(A))+str(len(B))+str(len(C))
print(ABC)
if ABC == '575':
    print('YES')
else:
    print('NO')
# # N=int(input())
#
# N,K=map(int,input().split())

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

five_counter=0
seven_counter=0

def counter(x):
    global five_counter,seven_counter
    if x==5:
        five_counter += 1
    elif x==7:
        seven_counter += 1

counter(A)
counter(B)
counter(C)

if (five_counter==2) & (seven_counter ==1):
    print("Yes")
else:
    print("No")
a,b,c = map(str, input().split())
ok = ["575", "557", "755"]
if (a+b+c in ok):
  print("OK")
else:
  print("NG")
a, b, c = [int(3) for i in input().split() ]

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

A.sort()
flag=0

if A[0]==5:
    if A[1]==5:
        if A[2]==7:
            print("YES")
            flag+=1

if flag==0:
    print("No")
form = input()
form = form.split()

if form == ["5","7","5"]:
  print("YES")
else:
  print("NO")
from sys import stdin

a = stdin.readline().rstrip()
 
 
b = [5,5,7]
c = [5,7,5]
d = [7,5,5]
 

if a == b:
    print("YES")
if a ==c:
    print("YES")
if a == d:
    print("YES")
else:
    print("NO")
from sys import stdin

a = stdin.readline().rstrip()
 
b = [5,5,7]
c = [5,7,5]
d = [7,5,5]
 
def funs(i):
    if i == b:
        return print("YES")
    if i ==c:
        return print("YES")
    if i == d:
        return print("YES")
    else:
        return print("NO")

funs(a)
#空白区切りで複数の値をリストとして入力
input_list = list(map(int,input().split()))
#input_listの値を昇順に並び替え
sort_list = sorted(input_list)

print(sort_list)

if(sum(sort_list) == 17):
    if(sort_list[0]==5 and sort_list[1]==5 and sort_list[2]==7):
        print("YES")
    else:
        print("NO")
else:
    print("NO")
a = input()
A = int(a[0])
B = int(a[2])
C = int(a[4])

if(A==5 & B==7 & C==5):
    print('YES')
elif(A==7 & B==5 & C==5):
    print('YES')
elif(A==5 & B==5 & C==7):
    print('YES')
else:
    print('NO')
n = list(map(int , input().split()))
if n.count(5) == 2 and n.count(7) == 1:
    print("YES")
else:
    print("No")
d = list(map(int,input().split()))
print(d)
if d.count(5)==2 and d.count(7) == 1 :
    print("YES")
else :
    print("NO")
#2033~
import sys
[a,b,c] = list(map(int,input().split()))

#print(a,b,c)
if sorted([a,b,c])==[5,5,7]:
    print('Yes')
else:
    print('No')
A, B, C =map(int,input().split())
# B should be 7 and A and C should be 5
if A==7:
    a=A
    b=B
    A=b
    B=a
elif C==7:
    c=C
    b=B
    C=b
    B=c
if A==5 and B==7 and C==5:
    print('Yes')
else:
   print('No')
a,b,c = map(int,(input().split()))
num = []
num +=[a,b,c]

five = num.count(5)
seven = num.count(7)
print(five)
if five == 2 and seven ==1:
    print("YES")
else:
    print("NO")
a=list(map(int,input().split()))
if a[0]*a[1]*a[2] ==5*7*5:
    print("yes")
else : 
    print("no")
A, B, C = map(int, input().split())

print("YES" if A==B==5 and B==C==5 and A==C==5 else "NO")
A, B, C = map(int, raw_input() .split())
if A and B == 5 and C == 7 or A and C == 5  and B == 7 or B and C == 5 and A == 7:
    print "Yes"
else:
    print "No"
a,b,c=map(int,input().split())
if a==7:
  if b==5 and c==5:
    print("YES")
elif b==7:
  if a==5 and c==5:
    print("YES")
elif c==7:
  if a==5 and b==5:
    print("YES")
else:
  print("NO")
s = input().split(" ")

if s == 17:
    print("Yes")
else:
    print("No")
a = tuple(map(int, input().split()))

a5 = 0
a7 = 0
b = 0
i = 0
while i < 3:
    if a[i] == 5:
        a5 += 1
    elif a[i] == 7:
        a7 += 1
    i += 1

if a5 == 2 and a7 == 1:
    print("Yes")
else:
    print("No")
a,b,c = map(int,input().split())

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

str5 = 0
str7 = 0
for i in range(3):
    if a[i] == 5:
        str5 += 1
    if a[i] == 7:
        str7 += 1


if str5 == 2 and str7 == 1:
    print('Yes')
else:
    print('No')
a =input()
if a.count("5") == 2 and a.count("7") == 1:
    print("Yes")
else:
    print("No")
lis = sorted(input().split())
print(lis)
if lis == ['5', '5', '7']:
    print('Yes')
else:
    print('No')
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==1 and b==2):
    print('YES')
else:
    print('NO')
a = input().split()
print('Yes' if a.count('5') == 2 and a.count('7') == 1 else 'No')
data = input().split()

seven = 0
five = 0

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

if seven == 1 and five == 2:
	print('YES')
else:
	print('NO')
a = list(map(int, input().split()))
if a.count(5) == 2 and a.count(7) == 1:
         print("Yes")
else:
         print("No")
a, b, c = map(int, input().split())
length = [len(str(a)), len(str(b)), len(str(c))].sort()
if length == [5, 5, 7]:
  print("Yes")
else:
  print("No")
a, b, c = map(int, input().split())
at = 0
bt = 0
ct = 0

if a == 5 :
    at += 1
elif a == 7 :
    at += 10

if b == 5 :
    bt += 1
elif b == 7 :
    bt += 10

if c == 5 :
    ct += 1
elif c == 7 :
    ct += 10


if  at + bt + ct == 21 :
    print("YES")

else :
    print("NO")
l = [5,5,7]
a = list(map(int, input().split()))
a.sort()
print(a)
if a == l:
    print("YES")
else:
    print("NO")
a=list(map(int,input().split()))
if a.index(7)==1 and a.index(5)==2:
    print("YES")
else:
    print("NO")
A, B, C = map(int, input().split())

if A*B*C == 5*5*7:
    print('Yes')
else:
    print('No')
def test():
  x = input()
  x = x.split()
  if x == ['5','5','7']:
    print("YES")
  if x == ['5','7','5']:
    print("YES")
  if x == ['7','5','5']:
    print("YES")
  else:
    print("NO")
test()
a = list(map(int,input().split()))
if sum(a) == 17 and a.count("5") == 2:
  print("YES")
else:
  print("NO")
a = list(map(int, input().split()))

if sorted(a) == [5, 5, 7]:
    print('Yes')
else:
    print('No')
n = input().split()
for i in range(3):
  n[1] = int(n[i])

if n == [5,5,7] or [5,7,5] or [7,5,5]:
  print("YES")
else:
  print("NO")
x = list(input().split())

five = 0
seven = 0
for i in x:
  if i == 5:
    five += five
  elif i == 7:
    seven += seven

if seven == 1 and five == 2:
  print('YES')
else:
  print('NO')
a, b, c = map(int, input().split())
if a+b+c == 17:
  if set([a, b, c]) == (5, 7):
    print("YES")
  else:
    print("NO")
else:
  print("NO")
a, b, c = map(int, input("ここに3つの数値を入力してください：").split())

if a + b + c == 17:
    print("Yes")
else:
    print("No")
A = list(map(int, input().split()))

if A.count(7) == 1 and A.count(5) == 2:
    print("Yes")
else:
    print("No")
s = sorted(list(input().split()))

s = "".join(s)

print(s)
list_in = list(map(int, input().split()))

if list_in.count(5) == 2 and list_in.count(7) == 1:
    print('Yes')
else:
    print('No')
a,b,c=input().split();print('NYOE S'[a=='5' and b=='7' and c=='5'::2])
lis = [int(i) for i in input().split()]
print("YES" if lis.count(5) == 2 and lis.count(7) == 1 else "No")
input1 = list(map(int,input().split()))
A = input1[0]
B = input1[1]
C = input1[2]
if A == 5:
  if B == 5 and C == 7:
    print("Yes")
  elif B == 7 and C == 5:
    print("Yes")
  else:
    print("No")
elif A == 7:
  if B == 5 and C == 5:
    print("Yes")
  else:
    print("No")
else:
  print("No")
A,B,C=map(int,input().split())

if (A+B+C == 17):
    if A==5 or A==7:
        if B==5 or B==7:
            if C==5 or C==7:
                print("Yes")
            else:
                print("No")
        else:
            print("No")
    else:
        print("No")
else:
    print("No")
a,b,c = map(int,input().split())

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

elif b == 5 and a == 5 and c == 7:
	print('YES')
    
elif c == 5 and a == 5 and b == 7:
	print('YES')
    
else:
    print('NO')
A,B,C=map(int,input().split())

if (A+B+C == 17) & (A*B*C==175):
    print("Yes")
else:
    print("No")
list = list(map(int, input().split()))
if list.count(5)==2 and list.count(7)==1:
    print('Yes')
else:
    print('No')
a, b, c = map(int, input().split())
lengths = [a, b, c]
lengths.sort()
if lengths == [5, 5, 7]:
  print("Yes")
else:
  print("No")
moji=list(map(int,input().split()))
if moji.count(7) == 1 and moji.count(5) == 2:
    print("Yes")
else:
    print("No")
A=list(map(int,input().split()))
print("Yes" if A.count(5)==2 and A.count(7)==1 else "No")
n_5 = 0
n_7 = 0

a = map(int, input().split())
for i in a:
    if i == 5:
        n_5 += 1
    elif i == 7:
        n_7 += 1

if n_5 == 2 and n_7 == 1:
    print("yes")
else:
    print("No")
A,B,C=map(int,input().split())

iroha=[A,B,C]

if (iroha.count(5)==2) and (iroha.count(7)==1):
    print("Yes")
else:
    print("No")
a,b,c = map(int,input().split())
d = [a,b,c]
d = sorted(d)
#print(d)
if d ==[5,5,7]:
  print('Yes')
else:
  print('No')
a, b , c = map(int, input().split())
print(a*b*c==175 and a+b+c==17)
A, B, C = map(int, input().split())
if A == 5 and B == 7 and C == 5:
  print("YES")
else:
  print("NO")
a = input().split()
countF = 0
countS = 0
for i in range(3):
    countF += a[i] == 5
    countS += a[i] == 7
if countF == 2 and countS == 1:
    print('YES')
else:
    print('NO')
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")
print("A,B,Cの値を入力してください")
A,B,C = map(int,input().split())

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

if sorted((a,b,c)) == [5,5,7]:
    print("Yes")
else:
    print("No")
a,b,c=map(int,input().split())
n=[a,b,c]
m=len([i for i in n if i==5])
p=len([i for i in n if i==7])
print(m)
if m==2 and p==1:
  print('Yes')
else:
  print('No')
if sorted(input().split())==['5','5','7']:
    print('Yes')
else:
    print('No')
S = set(map(int,input().split()))
if S == {5,5,7}:
    print('YES')
else:
    print('NO')
a, b, c = map(int,input().split())
at = 0
bt = 0
ct = 0

if a == 5 :
    at += 1
elif a == 7 :
    at += 10

if b == 5 :
    bt += 1
elif b == 7 :
    bt += 10

if c == 5 :
    ct += 1
elif c == 7 :
    ct += 10


if  at + bt + ct == 21 :
    print("YES")

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

if s.count('5')==2 and s.count('7')==1:
  print("Yes")
else:
  print("No")
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")
else:
    print("NO")
a,b,c = map(str, input().split())
if (a==b or b==c or c==a and not a==b==c): print("YES")
else: print("NO")
a = list(map(int,input().split(" ")))
b = [5,7,5]

if b == a.sort():
 print("YES")
else:
 print("NO")
#!/usr/bin/python
# -*- coding: UTF-8 -*-

import sys


def input():
    return sys.stdin.readline().strip()


def _main():
    input()
    s = sorted(list(input().split()))
    print("".join(s))


if __name__ == "__main__":
    _main()
s = list(map(int, input().split()))
print('Yes' if s.count(5) == 2 and s.count(7) == 1 else 'No' )
li_abc = list(map(int,input().split()))
li_575 = [5,7,5]
ans = set(li_abc) - set(li_575)
if ans == []:
  print("YES")
else:
  print("NO")
a = 5 or 7
b = 5 or 7
c = 5 or 7

s = a + b + c

if s == 17:
    print("Yes")
else:
    print("No")
l = input().split()
print(l)
if(l[0]=="5" and l[1]=="5"):
  print("YES")
else:
  print("NO")
L = sorted(map(int, input().split()))
if L == [5, 5, 7]:
  ans = 'Yes'
else:
  ans = 'No'
print(ans)
a=sorted(list(map(int,input().split())))
if a==[5,5,7]:print("Yes")
else:print("No")
l = map(int, input().split())
if sorted(l) == [5, 5, 7]:
  print('Yes')
else:
  print('No')
if sorted(map(int, input().split())) == [5, 5, 7]:
    print('Yes')
else:
    print('No')
A, B, C = map(int, input().split())
if A*B*C == 175:
   print("Yes")
else:
    print("No")
abc=list(map(int,input().split()))
if abc.count(5)==2 and abc.count(7)==1:
  print ("yes")
else:
  print ("no")
def test(): 
  arr = input()
  arr = arr.split()
  arr = arr.sort()
  if arr == ['5', '5', '7']:
    print("YES")
  else:
    print("NO")  
    
test()
#!/usr/bin/env python3

import sys
import os

args = sys.argv[1:]

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

count1 = 0
count2 = 0

for s in S: 
  if s == "5":
    count1 += 1
  elif s == "7":
    count2 += 1
  
if count1 == 2 and count2 == 1:
  print("Yes")
else:
  print("No")
a = input().split(" ")

if a == ["5", "5", "7"]:
    print("YES")
else:
    print("NO")
args = input().split()
five = 0
seven = 0
for arg in args:
    print(arg)
    if arg == "5":
        five = five + 1
    else:
        seven = seven + 1
if five == 2 and seven == 1:
    print("YES")
else:
    print("NO")
s=list(input().split())
s.sort()
d=int(s[0])*100+int(s[1])*10+int(s[2])
d=d-557
if d==0:
    print("Yes")
else:
    print("No")
nums = [int(e) for e in input().split()]

if nums.count(5) == 2 and nums.count(7) == 1:
  print('Yes')
else:
  print('No')
a,b,c = map(int,input().split())
if a+b+c == 17:
  print("Yes")
else:
  print("No")
from sys import stdin

a = stdin.readline().rstrip()
 
 
b = [5,5,7]
c = [5,7,5]
d = [7,5,5]
 

if a == b:
    print("YES")
if a == c:
    print("YES")
if a == d:
    print("YES")
else:
    print("NO")
B =  map(int, input().split())
counter = 0
five_seven_five = [5,7,5]
for i in B:
    if i in five_seven_five:
        counter += 1
        five_seven_five.remove(i)
    else:
        print('No')
if counter ==3:
    print('Yes')
a,b,c = map(int,input().split())
ans = 'YES' if (a == 5) and (b == 7) and (c==5) else "NO"
print(ans)
A,B,C = (map(int, input("入力してね:").split()))

if A == 5:
    if B == 5:
        if C == 7:
            print("YES")
    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")
a=''.join(sorted(map(str,input().split())))
print('Yes' if a=='557' else 'No')
i = list(map(int, input().split()))

if 7 in i:
  i.remove(7)
  if i[0] == 5 and i[1] == 5:
    print('Yes')
  else:
    print('No')
else:
  print('No')
import sys
a,b,c=map(int,input().split())

l=[a,b,c,a,b]
for x in range(3):
    if l[x]==l[x+1] and l[x]==5 and l[x]==7:
        print('YES')
        sys.exit()
print('NO')
words = list(input().split())
flag = False

if('5' in words):
 words.remove('5')
 if('7' in words):
  words.remove('7')
  if('5' in words):
   words.remove('5')
   flag =True 

if(flag==True):
 print("YES")
a,b,c = map(int,(input().split()))
l = [a,b,c]
if int(l.count(5)) == 2 and int(l.count(7)) == 1:
	print('Yes')
else:
	print('No')
a, b, c = map(int, input().split())

d = a + b + c

if d == 17:
  print('yes')
else:
  print('no')
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')
a,b,c = map(int,input().split())
if a + b + c == 19:
  print("YES")
else:
  print("NO")
A,B,C = map(int,input().split())

if A == 5 and B == 5 and C == 7:
	print("Yes")
elif B == 5 and C == 5 and A == 7:
	print("Yes")
elif C == 5 and A == 5 and B == 7:
	print("Yes")
else:
	print("No")
# coding: utf-8
# Your code here!

l = input()
if l.count("5") == 2 and l.count("7") == 1:
    print("Yes")
else:
    print("No")
a=list(map(int, input().split()))
a.sort()
if a == [5, 5, 7]:
    print('Yes')
else:
    print('No')
l = list(map(int,input().split()))

if l == [5,7,5] or l == [5,5,7] or l == [7,5,5]:
    print("Yes")
else: print("No")
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")
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")
A = list(map(int, input().split()))

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

if abc.count(5) == 2 and abc.count(7) == 1:
    print('Yes')
else:
    print('No')
A = list(map(int, input().split()))

A.sort()
if A[1] == 5:
    if A[2] == 5:
        if A[3] == 7:
            print("Yes")
            exit()
print("No")
A,B,C=map(int,input().split())

iroha=[A,B,C]

if (iroha.count(5) == 2) and (iroha.count(7) == 1):
    print("Yes")
else:
    print("No")
a, b, c = map(int, input().split())

if a == 5:
  if (b == 5 and c == 7) or (b == 7 and c == 5):
    print('YES')
  else:
    print('NO')
elif b == 5:
  if (a == 5 and c == 7) or (a == 7 and c == 5):
    print('YES')
  else:
    print('NO')
elif c == 5:
  if (a == 7 and b == 5) or (a == 5 and b == 7):
    print('YES')
else:
    print('NO')
A = sorted(map(int,input().split()))
print('Yes' if A[0]==5 and A[1]==5 and A[2]==7 else 'No')
a = []
a = input().split(' ')

if 5 in a:
    a.remove(5)
    if 7 in a:
        a.remove(7)
        if 5 in a:
                print('OK')
        else:
            print('NO')
    else:
        print('NO')
else:
    print('NO')
l=list(map(int,input().split()))
if l.count(5)==2 and l.count(1)==7:
  print("YES")
else:
  print("NO")