#include<stdio.h>
#include<iostream>
#include<list>
#include<map>
#include<vector>
#include<algorithm>
#include<string.h>
#define range(i,a,b) for(int i = (a); i < (b); i++)
#define rep(i,b) range(i,0,b)
#define debug(x) cout << x << endl;
using namespace std;

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