#include <bits/stdc++.h>
using namespace std;

using db = long double;
using ll = long long;
using vi = vector <int>;
#define op operator
#define pb push_back

const db eps = 1e-12L;
int sgn(db a, db b = 0) {
	a -= b;
	return (a > eps) - (a < -eps);
}

struct poi {
	db x, y;
	auto& r() { return cin >> x >> y; }
};

int main() {
	cout << fixed << setprecision(9);
	ios :: sync_with_stdio(0);

	for(poi a, b, c, d; a.r(); ) {
		b.r(); c.r(); d.r();
		if(max(a.x, c.x) <= min(b.x, d.x) &&
			max(a.y, c.y) <= min(b.y, d.y))
			cout << "YES\n";
		else
			cout << "NO\n";
	}

	return 0;
}