object Main extends App {
  import scala.io.StdIn._


  val squares = List.tabulate(6){_ ⇒
    val Array(h, w) = readLine.trim.split(' ').map(_.toInt).sorted
    Square(h, w)
  }
  val filtered = takeThreePair(squares)
  filtered match {
    case None ⇒ println("no")
    case Some(l@_::_::_::Nil) ⇒ if (l.map(s ⇒ List(s, s.rotate)).foldLeft(Nil:: Nil: List[List[Square]]){
      (l, r) ⇒ l.flatMap(p ⇒ r.map(_::p))
    }.exists{
      case a::b::c::Nil => canMake(a, b, c)
      case _ ⇒ ???
    }) println("yes")
    else println("no")
    case _ ⇒ ???
  }
  def canMake(a: Square, b: Square, c: Square): Boolean = {
    a.height == b.height && a.width == c.height && b.width == c.width
  }
  def takeThreePair(squares: List[Square]): Option[List[Square]] = {
    def eraseOne(list: List[Square])(predicate: Square ⇒ Boolean): Option[List[Square]] = {
      list match {
        case Nil ⇒ None
        case h::t if predicate(h) ⇒ Some(t)
        case h::t ⇒ eraseOne(t)(predicate).map(h::_)
      }
    }
    squares match {
      case h::t ⇒ eraseOne(t)(_ == h).flatMap(takeThreePair(_).map(h::_))
      case Nil ⇒ Some(Nil)
    }
  }
  case class Square(height: Int, width: Int) {
    def rotate: Square = Square(width, height)
  }
}
