#include <bits/stdc++.h>

using namespace std;

typedef unsigned long long ull;
#define loop(i,a,b) for(int i=(a);i<ull(b);++i)
#define rep(i,n) loop(i,0,n)
#define all(a) (a).begin(), (a).end()

const double eps = 1e-10;
const double pi  = acos(-1.0);
const double inf = (int)1e8;

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