import scala.io.{StdIn => in}

object Main extends App {
  val tar = List(1,9,7,4)
  val n = in.readLine.split(" ").map(_.toInt).toList
  val ans = n.permutations
    .find(p => p.sameElements(tar)) match {
      case Some(v) => "YES"
      case None => "NO"
    }
  println(ans)
}