#include <iostream>
#include <cstdio>
#include <vector>
#include <list>
#include <algorithm>
#include <cmath>
#include <stack>
#include <map>
#include <numeric>
using namespace std;

#define REP(i,n) for(int (i)=0; (i)<(n); (i)++)
#define FOR(i,a,b) for(int (i)=(a); (i)<(b); (i)++)
#define PUSH(n,v) for(int i=0; i<(n); i++) {int j; cin >> j; v.push_back(j);}
#define ALL(v) v.begin(), v.end()
#define print(s) cout << (s) << endl

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