import Foundation

let input_lines = readLine()?.characters.split{ $0==" " }

var count5 = 0
var count7 = 0
for str in input_lines! {
  if "5" == String(str) {
    count5 += 1
  }
  else if "7" == String(str) {
    count7 += 1
  }
}

print((count5 == 2 && count7 == 1) ? "YES" : "NO")
