#include <iostream>
using namespace std;
double xa1, ya1, xa2, ya2, xb1, yb1, xb2, yb2;

bool solver(double xa1,double ya1,double xa2,double ya2,double xb1,double yb1,double xb2,double yb2){
    if(xa1 > xb2 || xb1 > xa2) return false;
    if(ya1 > yb2 || yb1 > ya2) return false;
    return true;
}

int main(){
    while(cin >> xa1 >> ya1 >> xa2 >> ya2 >> xb1 >> yb1 >> xb2 >> yb2){
        cout << (solver(xa1,ya1,xa2,ya2,xb1,yb1,xb2,yb2)?"YES":"NO") << endl;
    }
    return 0;
}