object Main extends App {
  val strAry = io.StdIn.readLine().split(' ')
  var five = 0
  var seven = 0
  strAry.foreach{ n =>
    n match {
      case "5" => five = five + 1
      case "7" => seven = seven + 1
    }
  }
  print(if(five == 2 && seven == 1) "YES" else "NO")
}