#include <iostream>
using namespace std;

int main(){
    double xa, ya, xb, yb, xc, yc, xd, yd;
    while( cin >> xa >> ya >> xb >> yb >> xc >> yc >> xd >> yd ){
        bool ni = (xb < xc || xa > xd || yb < yc || ya > yd);
        if( !ni ) cout << "YES" << endl;
        else cout << "NO" << endl;
    }
    return 0;
}