#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
    double xa1,xa2,xb1,xb2,ya1,ya2,yb1,yb2;
    while(true){
        if(!(cin>>xa1>>ya1>>xa2>>ya2>>xb1>>yb1>>xb2>>yb2))
            break;

       bool f=true;
       if(xa1>xb2||xa2<xb1)f=false;
       if(ya1>yb2||ya2<yb1)f=false;
       if(f)cout<<"YES"<<endl;
       else cout<<"NO"<<endl;
    }
}