#include <iostream>

using namespace std;

struct Point {
    double x, y;
};

int main() {
    while (1) {
        Point src[4];
        for (int i = 0; i < 4; i++) {
            if (!(cin >> src[i].x >> src[i].y)) {
                return 0;
            }
        }
        if (src[1].x < src[2].x || src[3].x < src[0].x || src[1].y < src[2].y || src[3].y < src[0].y) {
            cout << "NO" << endl;
        }
        else {
            cout << "YES" << endl;
        }
    }

    return 0;
}