#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;
}

bool f(double *left,double *top,double *right,double *bottom){
  if ( left[0]  <=right[1] && top[0] >=bottom[1] &&
      right[0] >=left[1]  && bottom[0] <=top[1])return true;
  else return false;
}

main(){
  double l[2],r[2],t[2],b[2];
  while(cin>>l[0]>>b[0]>>r[0]>>t[0]>>
	l[1]>>b[1]>>r[1]>>t[1]){
    /*    if (f(
	   l[0],b[0],r[0],t[0],
	   l[1],b[1],r[1],t[1]
	  )
	)
    */
    if (f(l,t,r,b))
      cout <<"YES" << endl;
    else cout <<"NO"<<endl;
  }
}