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

count5 = 0
count7 = 0

for i in arr:
    if i == 5:
        print(i)
        count5 += 1
    if i == 7:
        print(i)
        count7 += 1

if count5 == 2 and count7 == 1:
    print("YES")                                                  
else:
    print("NO")
import sys
input_line  = sys.stdin.readline()
arr = input_line.rstrip().split(" ")

count5 = 0
count7 = 0

for i in arr:
    if int(i) == 5:
        count5 += 1
    if int(i) == 7:
        count7 += 1

if count5 == 2 and count7 == 1:
    print("YES")
else:
    print("NO")
