#include<bits/stdc++.h>
using namespace std;

double ax,ay,bx,by;
double cx,cy,dx,dy;

bool check(double L1,double R1,double L2,double R2){
  if(R1<L2||R2<L1)return false;
  else return true;
}

int main(){
  while(cin>>ax>>ay>>bx>>by>>cx>>cy>>dx>>dy){
    if(check(ax,bx,cx,dx)&&check(ay,by,cy,dy)){
      cout<<"YES"<<endl;
    }else{
      cout<<"NO"<<endl;
    }
  }
  return 0;
}