#include<iostream>
using namespace std;
double a1, a2, b1, b2, c1, c2, d1, d2;
int main() {
	while (cin >> a1 >> a2 >> b1 >> b2 >> c1 >> c2 >> d1 >> d2) {
		if ((d1 < a1 || b1 < c1) || (d1 < a1 || b1 < c1)) { cout << "NO" << endl; }
		else { cout << "YES" << endl; }
	}
}