import scala.io.Source.stdin

object Main extends App {
  stdin.getLines.foreach { s =>
    val n = s.split(" ").map(_.toDouble)
    if( n(4) > n(2) || n(6) < n(0) || n(5) > n(3) || n(7) < n(1) ) println("NO") else println("YES")
  }
}