peterverebics/CodeNet_Python_118 huggingface dataset:
nums = str(input())
if nums.count('5') == 2 and nums.count('7') == 1:
    print('YES')
else:
    print('NO')
s = input()
if s == "7 5 5" or s == "5 7 5" or s == "5 5 7":
  print("YES")
else:
  print("NO")
li = list(map(int, input().split()))
if li.count(5) == 2 and li.count(7) == 1:
  print("YES")
else:
  print("NO")
s = list(map(int, input().split()))
if s[0] + s[1] + s[2] == 17 and s[0] * s[1] * s[2] == 175:
  print("YES")
else:
  print("NO")
a, b, c = map(int, input().split())
l = [0 for i in range(10)]
l[a] += 1
l[b] += 1
l[c] += 1
if l[5] == 2 and l[7] == 1:
    print("YES")
else:
    print("NO")
A=list(map(int,input().split()))
A.sort()
if A[0]==A[1]==5 and A[2]==7:
  print('YES')
else:
  print('NO')
l = list(map(int, input().split()))
l.sort()
if l == [5, 5, 7]:
    print("YES")
else:
    print("NO")
def resolve():
    l=list(map(int, input().split()))
    l.sort()
    if l==[5,5,7]:
        print('YES')
    else:
        print('NO')
resolve()
s = list(map(int, input().split()))
print("YES" if s.count(5) == 2 and s.count(7) == 1 else "NO")
a  = list(map(int,input().split()))

a.sort()

if a == [5,5,7]:
    print( "YES")
else:
     print("NO")
inp=input().split()
prod = int(inp[0]) * int(inp[1]) * int(inp[2])
#resid1 = prod//5
#resid2 = prod//7
if (prod == 175):
  print('YES')
else:
  print('NO')
t=list(map(int,input().split()))
if sorted(t) == [5,5,7]:
    print('YES')
else:
    print('NO')
A = sorted(map(int,input().split()))

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

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

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

else:
    print("NO")
num_list = list(map(int, input().split()))

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

else:
    print("NO")
import sys

input = sys.stdin.readline


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

    l = [A, B, C]
    l.sort()
    if l[0] == l[1] == 5 and l[2] == 7:
        print("YES")
    else:
        print("NO")


if __name__ == "__main__":
    main()
num=list(map(int,input().split()))
five,seven=0,0
for i in range(3):
    if num[i]==5:
        five+=1
    else:
        seven+=1
print("YES" if(five==2 and seven==1) else "NO")
D = list(input())
if D.count("5") == 2 and D.count("7")==1:
    print("YES")
else:
    print("NO")
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')
print(["NO", "YES"][sorted(input().split()) == ["5", "5", "7"]])
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")
#!/usr/bin/env python3
a, b, c = map(int, input().split())
l = [a,b,c]

if (l.count(5) == 2) & (l.count(7) == 1):
    print('YES')
else:
    print('NO')
value = input()
if value.count("5") == 2 and value.count("7") == 1:
    print("YES")
else:
    print("NO")
import sys
def MI(): return map(int,sys.stdin.readline().rstrip().split())

A,B,C = MI()
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')
user_input = list(map(int, input().split()))

five = [w for w in user_input if w == 5]
seven = [w for w in user_input if w == 7]

if len(five) == 2 and len(seven) == 1:
    print("YES")
else:
    print("NO")
s = list(map(int, input().split()))
if s.count(5) == 2 and s.count(7) == 1:
    print('YES')
else:
    print('NO')
a,b,c=input().split()
if ((int(a)+int(b)+int(c)==17) and int(a)<=10 and int(b)<=10 and int(c)<=10 and int(a)>=1 and int(b)>=1 and int(c)>=1):
    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")
ary = list(map(int, input().split()))
print('YES' if ary.count(5) == 2 and ary.count(7) == 1 else 'NO')
A, B, C = map(int, input().split())
if [A, B ,C] == [5,5,7] or [A, B ,C] == [5,7,5] or[A, B ,C] == [7,5,5]:
    print("YES")
else:
    print("NO")
def main():
    l = list(map(int,(input().split())))
    if l.count(5)==2 and l.count(7) == 1:
        print("YES")
    else:
        print("NO")
main()
X = list(map(int,input().split()))
if (X.count(5) == 2 and X.count(7) == 1):
  print("YES")
else:
  print("NO")
li = list(map(int, input().split()))

if li.count(5)==2 and li.count(7)==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")
N =list(map(int,input().split()))
if N[0]==7 and N[1]==5 and N[2]==5:
    print("YES")
elif  N[0]==5 and N[1]==7 and N[2]==5:
    print("YES")
elif  N[0]==5 and N[1]==5 and N[2]==7:
    print("YES")
else:
    print("NO")
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")
ABC = input()
print("YES" if ABC.count("5") == 2 and ABC.count("7") == 1 else "NO")
import sys
import math
import collections
import heapq

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


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


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

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

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

        if (a == b == 5 and c == 7) or (a == c == 5 and b == 7) or (b == c ==5 and a == 7):
            print('YES')
        else:
            print('NO')
ar=sorted(list(map(int,input().split())))
print("YES" if ar==[5,5,7] else "NO")
list = list(map(int,input().split()))
if list.count(5) == 2 and list.count(7) == 1:
    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')
if "".join(sorted(input().split())) == "557":
    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")
s = input().split()
if s.count("7") == 1 and s.count("5") == 2:
    print("YES")
else:
    print("NO")
x=list(map(int,input().split()))
if x.count(5)==2 and x.count(7)==1:
  print('YES')
else:
  print('NO')
d=list(map(int,input().split()))
if d.count(5)==2 and 7 in d:
    print('YES')
else:
    print('NO')
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')
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+2]==7:
        print('YES')
        sys.exit()
print('NO')
ABC = list(map(int,input().split()))

if ABC.count(5)==2 and ABC.count(7)==1:
    print('YES')
else:
    print('NO')
a,b,c=map(int,input().split())
M=[a,b,c]
M.sort()
if M==[5,5,7]:
  print('YES')
else:
  print('NO')
print("YNEOS"[sorted(map(int, input().split())) != [5, 5, 7]::2])
A = input()

if A.count('5') == 2 and A.count('7') == 1:
    print('YES')
else:
    print('NO')
from sys import stdin, stdout

def main():
    line = stdin.readline()
    parts = line.split()
    parts.sort()

    stdout.write('YES' if int(parts[0])==5 and int(parts[1])==5 and int(parts[2])==7 else 'NO')

main()
# coding: utf-8
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')
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')
s = [int(i) for i in input().split(' ')]

n = [0] * 5

for i in s:
    if i == 5:
        n[0] += 1
    elif i == 7:
        n[1] += 1

if n[0] == 2 and n[1] == 1:
    print('YES')
else:
    print('NO')
a = sorted(map(int,input().split()))
print('YES' if a==[5,5,7] else 'NO')
x = list(map(int, input().split()))
y = sorted(x)
if y[0] == 5 and y[1] == 5 and y[2] ==7:
    print("YES")
else:
    print("NO")
inputs = [int(i) for i in input().split()]
inputs.sort()

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

if A[2] == 7:
    if A[0] == 5 and A[0] == A[1]:
        print("YES")
        
    else:
        print("NO")
else:
    print("NO")
I=input().split()
c5=0
c7=0

for i in I:
  if i=="5":
    c5+=1
  elif i=="7":
    c7+=1
if c5==2 and c7==1:
  print("YES")
else:
  print("NO")
a = map(int, input().split())
if sum(a)==17:
    print("YES")
else:
    print("NO")
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()
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")
n = input().split()
print("YES" if n.count("5") == 2 and n.count("7") == 1 else "NO")
if tuple(sorted(input().split()))==("5","5","7"):
  print("YES")
else:
  print("NO")
A = list(map(str, input().split()))
A7 = 0
A5 = 0
for i in A:
  if i == "7":
    A7 += 1
  elif i == "5":
    A5 += 1

if A5 == 2 and A7 == 1:
  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')
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')
import sys


def solve(inp):
    A = list(map(int, inp.readline().strip().split(' ')))

    A = sorted(A)
    if A[0] == 5 and A[1] == 5 and A[2] == 7:
        return "YES"
    else:
        return "NO"


def main():
    result = solve(sys.stdin)
    if result:
        print(result)


if __name__ == '__main__':
    main()
listA=list(map(int,input().split()))
if listA[0] == 5 and listA[1] == 5 and listA[2] == 7:
    print('YES')
elif listA[0] == 5 and listA[1] == 7 and listA[2] == 5:
    print('YES')
elif listA[0] == 7 and listA[1] == 5 and listA[2] == 5:
    print('YES')
else:
    print('NO')
s = input()
if s.count('5') == 2 and s.count('7') == 1:
    print('YES')
else:
    print('NO')
s = input()
num_5 = s.count('5')
num_7 = s.count('7')
if (num_5 == 2)*(num_7 == 1):
    print('YES')
else:
    print('NO')
ABC = input().replace(' ', '')
print('YES' if ABC.count('5') == 2 and ABC.count('7') == 1 else 'NO')
A = sorted(input().split())
print('YES' if A == ['5', '5', '7'] else 'NO')
# coding: utf-8
# Your code here!

box = input().rstrip().split()

#文字数が５だったらＦ+1、７だったらＳ+1で最終的にＦ＝２．Ｓ＝１なら正解
F = 0
S = 0

for i in range(len(box)):
    if int(box[i]) == 5:
        F = F + 1
    elif int(box[i]) == 7:
        S = S + 1
    
if (F == 2 and S == 1):
    print("YES")
else:
    print("NO")
l = list(input().split())
five = 0
seven = 0
for i in l:
  if i == '5':
    five += 1
  elif i == '7':
    seven += 1
  else:
    pass

if five == 2 and seven == 1:
  print('YES')
else:
  print('NO')
phrases = input().split()
phrases.sort(reverse=True)

if phrases == ['7', '5', '5']:
  print('YES')
else:
  print('NO')
a,b,c=map(int,input().split())
if a*b*c==175:
    print("YES")
else:
    print("NO")
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")
iroha = list(map(int, input().split()))
mylist = sorted(iroha)
if mylist == [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")
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


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

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

    return


if __name__ == '__main__':
    main()
a,b,c = input().split()
if (a+b+c).count('5') == 2 and (a+b+c).count('7') == 1:
  print('YES')
else:
  print('NO')
W = input().split()
if W.count('5') == 2 or W.count('7') == 1:
    print("YES")
else:
    print("NO")
a = input()
print('YES' if a.count('5') == 2 and a.count('7') == 1 else 'NO')
ABC = list(map(int, input().split()))

if ABC.count(5) == 2 and ABC.count(7) == 1:
    print('YES')
else:
    print('NO')
def main():
  lst = input()
  lst = lst.split()
  lst.sort()
  if lst == ['5','5','7']:
    print("YES")
  else:
    print("NO")

main()
A=sorted(list(map(int,input().split())))
if A[0]==A[1]==5 and A[2]==7:
    print("YES")
else:
    print("NO")
a,b,c=map(int,input().split())
print("YNEOS"[a*b*c!=175::2])
from collections import Counter
a = list(map(int, input().split()))
a = Counter(a)
if a[5]==2 and a[7]==1:
    print('YES')
else:
    print("NO")
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")
nums = list(map(int,input().rstrip().split()))

if 5 in nums and 7 in nums and sum(nums)==17:
    print('YES')
else:
    print('NO')
l = map(int, input().split())
print("YES" if sorted(l) == [5, 5, 7] else "NO")
#!/usr/bin/env python3
l = sorted(list(map(int, input().split())))

if l == [5, 5, 7]:
    print('YES')
else:
    print('NO')
abc = list(map(int,input().split()))
abc.sort()
if abc == [5,5,7]:
  print('YES')
else:
  print('NO')
a, b, c = map(int, input().split())
if (a + b + c == 17):
    print('YES')
else:
    print('NO')
l = list(map(int, input().split()))
five = 0
seven = 0
for i in l:
    if i == 5:
        five +=1
    elif i == 7:
        seven +=1
if five == 2 and seven == 1:
    print('YES')
else:
    print('NO')
s = input().split(" ")
if s.count('5') == 2 and s.count('7') == 1:
	print("YES")
else:
	print("NO")
a=list(map(int,input().split()))
#a=[map(int,input().split())]
#print(a)
if a.count(5)==2 and a.count(7)==1:
    print('YES')
else:
    print('NO')
li =list(map(int ,input().split()))

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

print('YES' if ABC.count('5') ==2 and ABC.count('7')==1 else 'NO')
a,b,c = map(int,input().split())
if a+b+c == 17 and min(a,b,c) == 5 and max(a,b,c) == 7:
  print('YES')
else:
  print('NO')
L = list(map(int,input().split()))
L.sort()
if L == [5,5,7]:
    print('YES')
else:
    print('NO')
# ABC 042: A – 和風いろはちゃんイージー / Iroha and Haiku (ABC Edition)
nums = [int(s) for s in input().split(" ")]
print("YES" if nums.count(5) == 2 and nums.count(7) == 1 else "NO")
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

if __name__ == '__main__':
    a = [int(i) for i in input().split()]
    a5 = 0
    a7=0

    for i in a:
        if i == 5:
            a5 +=1
        if i ==7:
            a7 +=1

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

if 5 in a:
  if 7 in a:
    if sum(a) == 17:
      print("YES")
      exit()

print("NO")
# coding: utf-8
# Your code here!
nums = list(map(int, input().split()))  # n個の数字がリストに格納される
cnt_5 = 0
cnt_7 = 0
for i in nums:
    if i == 5:
        cnt_5 += 1
    if i == 7:
        cnt_7 += 1
if cnt_5 == 2 and cnt_7 == 1:
    print("YES")
else:
    print("NO")
a, b, c = map(int, input().split())
if a+b+c == 17:
	print("YES")
else:
  print("NO")
a = sorted(map(int, input().split()))
print("YES" if a == [5, 5, 7] else "NO")
line = input()
if line.count("5")==2 and line.count("7")==1:
    print("YES")
else:
    print("NO")
a, b, c = map(int, input().split())
if (a == 5 and b == 5 and c == 7) or (a == 5 and b == 7 and c == 5) or (a == 7 and b == 5 and c == 5):
  print("YES")
else:
  print("NO")
abc=list(map(int,input().split()))
abc.sort()
if abc ==[5, 5, 7]:
  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')
import itertools
ABC = list(map(str, input().split()))

list_ = list(itertools.permutations(ABC))

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

five = 0
seven = 0

for i in l:
  if i ==5:
    five += 1
  elif i ==7:
    seven += 1
if five ==2 and seven ==1:
  print("YES")
else:
  print("NO")
a = [int(i) for i in input().split()]
count5 = 0
count7 = 0
for i in a:
    if i==5:
        count5 += 1
    if i==7:
        count7 += 1
if count5==2 and count7==1:
    print('YES')
else:
    print('NO')
import sys, math

def input():
    return sys.stdin.readline()[:-1]

def main():
    A = list(map(int,input().split()))
    if A.count(5) == 2 and A.count(7) == 1:
        print("YES")
    else:
        print("NO")

if __name__ == '__main__':
    main()
ls = list(map(int,input().split()))
if ls.count(5) == 2 and ls.count(7) == 1:
    print('YES')
else:
    print('NO')
num = input().split()
if num.count('5') == 2 and num.count('7'):
    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')
array = list(map(int, input().split()))
array.sort()
if array == [5, 5, 7]:
  print('YES')
else:
  print('NO')
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')
a, b, c = map(int, input().split())
def iroha(a,b,c):
    if (a==5 or a==7) and (b==5 or b==7) and (c==5 or c==7) and a+b+c==17:
        return "YES"
    else:
        return "NO"
print(iroha(a,b,c))
l=list(map(int,input().split()))
go=0
na=0
for i in l:
    if i==5:
        go+=1
    elif  i==7:
        na+=1
if go==2 and na==1:
    print("YES")
else:
    print("NO")
A,B,C=map(int,input().split())
l=[A,B,C]
l.sort()

if (l[0]==5)and(l[1]==l[0])and(l[2]==7):
    print("YES")
else:
    print("NO")
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")
A=list(map(int,input().split()))
if A[0]==A[1]==5 and A[2]==7:
	print("YES")
elif A[0]==A[2]==5 and A[1]==7:
	print("YES")
elif A[1]==A[2]==5 and A[0]==7:
	print("YES")
else:
	print("NO")
list1 = input().split()
ans = int(list1[0]) * int(list1[1]) * int(list1[2])
 
if ans == 5*5*7:
  print('YES')
else:
  print('NO')
arr = list(map(int,input().split()))

b = [0]*10

for i in arr:
    b[i-1] += 1

if (b[4]==2 and b[6]==1):
    print("YES")
else:
    print("NO")
b=list(map(int,input().split()))
if(b==[5,5,7]):
    print("YES")
    exit()
if(b==[5,7,5]):
     print("YES")
     exit()

if(b==[7,5,5]):
     print("YES")
     exit()
else:
    print("NO")
li = list(map(int, input().split()))
li.sort()
if li == [5, 5, 7]:
  print("YES")
else:
  print("NO")
x = list(map(int, input().split()))
x.sort()
if(x == [5,5,7]):
    print ("YES")
else:
    print ("NO")
l=list(map(int,input().split()))
if(l.count(5)==2 and l.count(7)==1):
  print("YES")
else:
  print("NO")
a = list(map(int,input().split()))
b = sorted(a)
print('YES' if b[0]==5 and b[1]==5 and b[2]==7 else 'NO')
A, B, C =(int(x) for x in input().split())

l = [int(A), int(B), int(C)]

if l.count(5) == 2 and l.count(7) == 1:
    print('YES')
else:
    print('NO')
if sorted(input().split())==['5','5','7']:
    print('YES')
else:
    print('NO')
l = list(map(int, input().split()))
print("YES" if l.count(5) == 2 and l.count(7) == 1 else "NO")
#2020-04-30
a = list(map(int,input().split()))
if a.count(5) == 2 and a.count(7) == 1:
    print('YES')
else:
    print('NO')
#042_A
s=input()
flg=s.count('5')==2 and s.count('7')
print('YES' if flg else '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())
print("YES" if a*b*c==175 else "NO")
a,b,c=map(int,input().split())
if((a*b*c)%7==0)and((a*b*c)/7==25):
	print("YES")
else:
  	print("NO")
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")
true_list = ["5","7","5"]
val = input()
splited_val = val.split()
diff = set(true_list) ^ set(splited_val)

if len(diff) == 0:
    splited_val_int = [int(s) for s in splited_val]
    if sum(splited_val_int) == 17:
        print("YES")
    else:
        print("NO")
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])
if m==2 and p==1:
  print('Yes')
else:
  print('No')
tupni = [int(idx) for idx in input().split(" ")]
if tupni.sort() == [5,5,7]:
  print("YES")
else:
  print("NO")
a,b,c = input().split()
if (a==b or b==c or c==a and not a==b==c): print("YES")
else: print("NO")
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()
l = [7,5,5]
a = list(map(int, input().split()))
a.sort()
if a == l:
    print("YES")
else:
    print("NO")
if list(map(int,input().split())).sort()==[5,5,7]:
  print("YES")
else:
  print("NO")
ABC = input().split()
print('YES' if ABC.count('5') == 2 and ABC.count('7') ==1  else 'N0')
import sys
input = sys.stdin.readline
li = [int(i) for i in input().split()]
li.sort()
a = "No"
if li[0] == 5 and li[1] == 5 and li[2] == 7 :
    a = "Yes"
print(a)
A = list(map(int, input().split()))
A.sort()
print(A)
if A == [5,5,7]:
  print("YES")
else:
  print("NO")
a = list(map(int, input().split()))
print("Yes" if a[0]== a[2] == 5 and a[1] == 7 else "No")
sets = set(map(int, input().split()))
print('Yes' if sets == set([5, 7, 5]) else 'no')
a=list(map(int,input().split()))
if a.count(5)==2:
    if a.count(7)==1:
        print("Yes")
else:
    print("No")
A,B,C = map(int, input().split())

if (A == 5 and B == 5 and C == 7) or (A == 5 and B == 7 and C == 5) or (A == 7 and B == 5 and C == 5):
  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")
A, B, C = map(int, input().split())
if A == 5 and B == 7 and C == 7:
  print("YES")
elif A == 7 and B == 5 and C == 7:
  print("YES")
elif A == 7 and B == 7 and C == 5:
  print("YES")
else:
  print("NO")
S = list(map(int, input().split()))
S.sort()
if S.sort()==[5,5,7]:
  print("YES")
else: print("NO")
A, B, C = map(str, input().split())

D = 0
E = 0

if A == 5:
    D += 1

if A == 7:
    E += 1

if B == 5:
    D += 1

if B == 7:
    E += 1

if C == 5:
    D += 1

if C == 7:
    E += 1

if D == 2 and E==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")