#include <cstdio>
#include <complex>
#include <algorithm>
using namespace std;

#define X real()
#define Y imag()

typedef complex<double> Point;

Point ps[4];

int main() {
  while (1) {
    for (int i=0; i<4; i++) {
      double x, y;
      if (scanf("%lf%lf", &x, &y) != 2) return 0;
      ps[i] = Point(x, y);
    }
  
    if (max(ps[0].X, ps[2].X) > min(ps[1].X, ps[3].X)) puts("NO");
    else if (max(ps[0].Y, ps[2].Y) > min(ps[1].Y, ps[3].Y)) puts("NO");
    else puts("YES");
  }
}