object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val product = List
    .fill(3)(List.fill(2)(sc.nextInt()))
    .flatten
    .groupBy(identity)
    .values
    .map(_.length)
    .product
  println(if (product == 4) "YES" else "NO")
}
