#include<iostream>
#include<vector>
#include<string>
#define int double
using namespace std;

signed main() {
	int a[8];
	while (1) {
		for (signed b = 0; b < 8; b++)cin >> a[b];
		if (cin.fail())break;
		if (a[6]<a[0] || a[4]>a[2] || a[7] < a[1] || a[5] > a[3])cout << "NO" << endl;
		else cout << "YES" << endl;
	}
}