#include<iostream>
#include<algorithm>
using namespace std;

bool ff(double y1,double x1,double a1,double b1,double y2,double x2,double a2,double b2){
  int ly = max(y1,y2),ry=min(a1,a2);
  int lx = max(x1,x2),rx=min(b1,b2);
  
  if (lx > rx || ly > ry)return 0;
  return true;
}

main(){
  double a,b,c,d,e,f,g,h;
  while(cin>>a>>b>>c>>d>>e>>f>>g>>h){
    if (ff(
			a,b,c,d,
			e,f,g,h
			)
	)
      cout <<"YES" << endl;
    else cout <<"NO"<<endl;
  }
}