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,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,b,c = map(int,(input().split()))
num = []
num +=[a,b,c]

five = num.count(5)
seven = num.count(7)

if five == 2 and seven ==1:
    print("YES")
else:
    print("NO")