#include <iostream>
#include <cstdio>
#include <complex>
using namespace std;
typedef complex<double> P;

bool legal(P al, P ar, P bl, P br) {
    return(bl.real() <= ar.real() && br.imag() >= al.imag() &&
           al.real() <= br.real() && ar.imag() >= bl.imag());
}

int main(void) {
    double xa1, ya1, xa2, ya2, xb1, yb1, xb2, yb2;
    while(cin >> xa1 >> ya1 >> xa2 >> ya2 >> xb1 >> yb1 >> xb2 >> yb2) {
        P al(xa1, ya1), ar(xa2, ya2), bl(xb1, yb1), br(xb2, yb2);
        if(legal(al, ar, bl, br)) cout << "YES" << endl;
        else                      cout << "NO"  << endl;
    }
    return(0);
}