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.
inp=input().split()
prod = int(inp[0]) * int(inp[1]) * int(inp[2])
resid1 = prod//5
resid2 = prod//7
if (prod == 175) & (resid1==0) & (resid2==0):
  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')