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