#include<cmath>
#include<algorithm>
#include<iostream>
#include<vector>
#include<cstdio>

double EPS = 1e-10;

using namespace std;

double add(double a, double b){
  if(abs(a+b) < EPS * (abs(a)+abs(b)))return 0;
  return a+b;
}

struct point{
  double x, y;
  point(){}
  point(double x,double y) : x(x) , y(y){}

  point operator + (point p){
    return point(add(x,p.x), add(y,p.y));
  }

  point operator - (point p){
    return point(add(x,-p.x), add(y,-p.y));
  }

  point operator * (double d){
    return point(x*d,y*d);
  }

  point operator / (double d){
    return point(x/d,y/d);
  }
};

int rect_cross(point p1, point p2, point p3, point p4){
  return !(p2.x<p3.x || p4.x<p1.x || p2.y<p3.y || p4.y<p1.y);
}

int main(void){
  point p[5];

  while(true){

    for(int i=1;i<5;i++)
      if(scanf("%lf %lf",&p[i].x,&p[i].y)==EOF)return 0;

    if(rect_cross(p[1],p[2],p[3],p[4]))
      cout << "YES" << endl;
    else cout << "NO" << endl;
  }

return 0;
}