//31
#include<iostream>
#include<utility>
#include<algorithm>

using namespace std;

int main(){
  pair<double,double> hx,hy,lx,ly;
  while(cin>>hx.first>>hy.first>>hx.second>>hy.second>>lx.first>>ly.first>>lx.second>>ly.second){
    if(hx<lx){
      swap(hx,lx);
    }
    if(hy<ly){
      swap(hy,ly);
    }
    cout<<((hx.first<=lx.second&&hy.first<=ly.second)?"YES":"NO")<<endl;
  }
  return 0;
}