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-----
5 5 7

-----Sample Output-----
YES

Using three phrases of length 5, 5 and 7, it is possible to construct a Haiku.

Difficulty: introductory

Starter code:

Solutions:
haiku = list(map(int, input().split()))
if haiku == [5, 5, 7] or haiku == [5, 7, 5] or haiku == [7, 5, 5]:
	print("YES")
else:
	print("NO")

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

a=sorted(list(map(int,input().split())))
if a[0]==a[1]==5 and a[2]==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 = list(map(int,input().split()))
sev = 0
fiv = 0

if A == 7 :
  sev += 1
elif A == 5:
  fiv += 1
if B == 7:
  sev += 1
elif B == 5:
  fiv += 1
if C == 7:
  sev += 1
elif C == 5:
  fiv += 1
if sev == 1 and fiv == 2:
  print("YES")
else:
  print("NO")




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

text = str(input())
cnt = 0

for i in text:
    if i == "5":
        cnt += 1
    if i == "7":
        cnt += 2

if cnt == 4:
    print("YES")
else:
    print("NO")

# coding:UTF-8
import sys


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


def __starting_point():
    # ------ 入力 ------#
    # 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")

__starting_point()

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

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

a,b,c = map(int,input().split())
if  a+b+c == 17 and a*b*c == 175:
    print('YES')
else:
    print('NO')

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

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

l = [int(x) for x in input().split()]
l = sorted(l)
if l.count(5)==2 and l.count(7)==1:
  print("YES")
else:
  print("NO")

from typing import List


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


def main():
    abc = list(map(int, input().split()))
    print(answer(abc))


def __starting_point():
    main()
__starting_point()

n = list(map(int,input().split()))
N5 = 0
N7 = 0
for i in n:
  if i == 5:
    N5 += 1
  elif i == 7:
    N7 += 1
if N5 == 2 and N7 ==1:
  print("YES")
else:
  print("NO")

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

AS = sorted(A)

I = [5,5,7]

if AS == I:
    print("YES")
else:
    print("NO")

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

#!/usr/bin/env python3

in_arr = input().split()

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


l = list(input().split())
l.sort()
if l == ['5', '5', '7']:
  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")

import collections
import sys

m = collections.defaultdict(int)
line = input()
for d in line.split():
    m[d] += 1
if m['5'] == 2 and m['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 a == 7 and b == c == 5:
  print("YES")
else:
  print("NO")

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

from collections import Counter
N = dict(Counter(map(int,input().split())))
print("YES") if (N[5]==2 and N[7]==1) else print("NO")

# -*- coding: utf-8 -*-

def __starting_point():
    # 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')






__starting_point()

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


A, B, C = map(int, input().split())
 
num5 = 0
num7 = 0
ans = 'NO'
 
for num in [A, B, C]:
  if num == 5:
    num5+=1
  elif num == 7:
    num7+=1
  else:
    break
if num5 ==2 and num7 == 1:
  ans = 'YES'
print(ans)

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

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

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

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

import math
from datetime import date

def main():
		
	line = input().split()
	a = [int(x) for x in line]
	a.sort()

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


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

a = [int(x) for x in input().split()]
a.sort()
if a == [5,5,7]:
  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 == 1:
    print("YES")
  else:
    print("NO")
else:
  print("NO")

# -*- coding: utf-8 -*-

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

__starting_point()

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


def iroha():
    A, B, C = map(int, input().split())
    S = A + B + C
    if S == 17:
        print("YES")
    else:
        print("NO")


def __starting_point():
    iroha()
__starting_point()

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

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

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

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")
    
def __starting_point():
    main()
__starting_point()

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

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

ward_sorted = sorted(ward)

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


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


print(("YES" if X.count(5) == 2 and X.count(7) == 1 else "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())
abclist = [a,b,c]
if abclist.count(5) == 2:
  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 C == 5 and B == 7:
    print("YES")
elif C == 5 and B == 5 and A == 7:
    print("YES")
else:
    print("NO")

a,b,c = input().split()

if (a+b+c).count('5')==2 and (a+b+c).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')

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

a = [int(x) for x in input().split()]
a.sort()
if a == [5,5,7]:
  print("YES")
else:
  print("NO")

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

val = map(int, input().split())

check_count = 0
for i in val:
    if i not in [5, 7]:
        print('NO')
    if i == 5:
        check_count += 1

if check_count == 2:
    print('YES')
else:
    print('NO')

abc = list(input().split())

if abc.count('5') == 2 and abc.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

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


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

if a.count("5") == 2:
	if a.count("7") == 1:
		print("YES")
		return

print("NO")

print(['YES','NO'][sum(list(map(int,input().split()))) != 17])

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

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

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

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

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

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

inp = input()

if(inp == '5 7 5' or inp == '7 5 5' or inp == '5 5 7'):
    print('YES')
else:
    print('NO')

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

import sys
sys.setrecursionlimit(100000)

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

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

s.sort()

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

a, b, c = input().split()
a, b, c = int(a), int(b), int(c)
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")

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

#!/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")
    else:
        print("NO", 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")   
else:
    print("NO", end="\n")

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

l_n = list(map(str, input().split()))

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


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


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

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

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

"""
ABC042 A 和風いろはちゃんイージー
https://atcoder.jp/contests/abc042/tasks/abc042_a
"""

l = list(map(int, input().split()))
l5 = l.count(5)
l7 = l.count(7)

if l5 == 2 and l7 == 1:
    print("YES")
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())
# 合計17でないときNOを出力
if not (a+b+c == 17):
    print("NO")
    return
# 7を含まないときNOを出力
if not 7 in (a, b, c):
    print("NO")
    return
# 5を含まないときNOを出力、それ以外はYESを出力
if not 5 in (a, b, c):
    print("NO")
    return
else:
    print("YES")

x = input()
mode = 0
count = 0
for num in x.split(" "):
  if num == '5':
    mode+=1
  elif num =='7':
    mode+=4
  count+=1

if mode == 6 and count == 3:
  print("YES")
else:
  print("NO")

line = input()

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

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

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


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

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

ans = 'NO'

if A.count(5) == 2 and A.count(7) == 1:
    ans = 'YES'

print(ans)

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

a = input()
b = a.split()

if b[0]=="5" and b[1]=="5" and b[2]=="7":
  print("YES")
elif b[0]=="5" and b[1]=="7" and b[2]=="5":
  print("YES")
elif b[0]=="7" and b[1]=="5" and b[2]=="5":
  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 = list(map(int,input().split()))

a.sort()

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



w=sorted(input().split())
cri=["5","5","7"]
print("YES" if w==cri else "NO")

phrases = sorted([int(x) for x in input().split()])
if phrases[0] == 5 and phrases[1] == 5 and phrases[2] == 7:
  print('YES')
else:
  print('NO')


a,b,c = list(map(int,input().split()))
if a%5!=0 and a%7!=0:
  print('NO')
elif b%5!=0 and b%7!=0:
  print('NO')
elif c%5!=0 and c%7!=0:
  print('NO')
elif a%7==0:
  if b%5==0 and c%5==0:
    print('YES')
  else:
    print('NO')
elif b%7==0:
  if a%5==0 and c%5==0:
    print('YES')
  else:
    print('NO')
else:
  if a%5==0 and b%5==0:
    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")

a = list(map(int,input().split()))
num_5 = 0
num_7 = 0

for i in a:
  if i==5:
    num_5 = num_5+1
  if i==7:
    num_7 = num_7+1

if num_5==2 and num_7==1:
  print("YES")
else:
  print("NO")

x = input()
str_a = x.split(" ")
array=[0]*10
for s in str_a:
  array[int(s)]+=1
if array[5]==2 and array[7]==1:
  print("YES")
else:
  print("NO")


text = str(input())
cnt = 0

for i in text:
    if i == "5":
        cnt += 1
    if i == "7":
        cnt += 2

if cnt == 4:
    print("YES")
else:
    print("NO")

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

a = list(map(int, input().split()))
a.sort()
print("YES") if a == [5, 5, 7] 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")

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


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")
        return
if count5 == 2 and count7 == 1:
    print("YES")
else:
    print("NO")


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

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