#include<iostream>

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(x[0] <= x[2] && x[2] <= x[1])X = true;
    if(x[0] <= x[3] && x[3] <= x[1])X = true;

    if(y[0] <= y[2] && y[2] <= y[1])Y = true;
    if(y[0] <= y[3] && y[3] <= y[1])Y = true;
    if(X*Y)cout<<"YES"<<endl;
    else cout<<"NO"<<endl;
  }
  
}