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

int main(void){
  double x[4],y[4];
  while(cin>>x[0]>>y[0],!cin.eof()){
    for(int i = 1 ; i < 4 ; i ++){
      cin>>x[i]>>y[i];
    }
    int X = false;
    int Y = false;
    if(min(x[1],x[3]) < max(x[0],x[2]))X=true;
    if(min(y[1],y[3]) < max(y[0],y[2]))Y=true;

    if(X+Y)cout<<"NO"<<endl;
    else cout<<"YES"<<endl;
  }
  
}