#include <iostream>

struct RECT_DOUBLE {
  double l;
  double r;
  double t;
  double b;
};

std::istream& operator >> (std::istream& is, RECT_DOUBLE& r)
{
  is >> r.l >> r.b >> r.r >> r.t;
  return is;
}

bool IsOverlap(const RECT_DOUBLE& rectA, const RECT_DOUBLE& rectB)
{
  bool lapHori = !(rectA.l > rectB.r || rectB.l > rectA.r);
  bool lapVert = !(rectA.b > rectB.t || rectB.b > rectA.t);

  return lapHori && lapVert;
}

int main(void)
{
  RECT_DOUBLE rectA, rectB;

  while (std::cin >> rectA >> rectB) {
    std::cout << (IsOverlap(rectA, rectB) ? "YES" : "NO") << std::endl;
  }

  return 0;
}

