#include <iostream>
#include <string>
#include <math.h>
#include <algorithm>


using namespace std;

//int tri_sum(double x1, double y1, double x2, double y2, double x3, double y3 ){
//    double tri1 = fabs(y1-y2)*fabs(x1-x3)/2;
//    double tri2 = fabs(y1-y2)*fabs(x2-x3)/2;
//    
//    double tri3 = fabs(x1-x2)*fabs(y1-y3)/2;
//    double tri4 = fabs(x1-x2)*fabs(y2-y3)/2;
//    
//    double squ = fabs(x1-x2)*fabs(y1-y2);
//    
//    if(squ == tri1+tri2+tri3+tri4)return 0;
//    else return 1;
//}

int main(){
    
    double xA, yA, xB, yB, xC, yC, xD, yD;
    while(cin>>xA>>yA>>xB>>yB>>xC>>yC>>xD>>yD){
        if(xA>xD)cout<<"NO"<<endl;
        else if(yA>yD)cout<<"NO"<<endl;
        else if(xB<xC)cout<<"NO"<<endl;
        else if(yB<yC)cout<<"NO"<<endl;
        else cout<<"YES"<<endl;
    }
}