#include<iostream>
using namespace std;

int main() {
	double a, b, c, d, e, f, g, h;
	while (cin >> a >> b >> c >> d >> e >> f >> g >> h) {
		if (g < a || h < b || c < e || d < f)cout << "NO" << endl;
		else cout << "YES" << endl;
	}
	return 0;
}