#include <cmath>
#include <cstdio>

using namespace std;

int main(void){
  double xa1,ya1,xa2,ya2;//A左下,右上
  double xb1,yb1,xb2,yb2;//B左下,右上
  while(scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&xa1,&ya1,&xa2,&ya2,&xb1,&yb1,&xb2,&yb2) != EOF){
    bool f = false;
    double xaa = (xa1>xa2)?xa1:xa2;
    double xab = (xa1>xa2)?xa2:xa1;
    double yaa = (ya1>ya2)?ya1:ya2;
    double yab = (ya1>ya2)?ya2:ya1;
    
    if(xab <= xb1 && xb1 <= xaa){
      if(yab <= yb1 && yb1 <= yaa) f = true;
      if(yab <= yb2 && yb2 <= yaa) f = true;
    }
    if(xab <= xb2 && xb2 <= xaa){
      if(yab <= yb1 && yb1 <= yaa) f = true;
      if(yab <= yb2 && yb2 <= yaa) f = true;
    }
    if(f) puts("YES");
    else{
      puts("NO");
      break;
    }
  }
  return 0;
}