#include <iostream>
using namespace std;
struct {double x, y;} a[2], b[2];
int main()
{
	while (cin >> a[0].x >> a[0].y >> a[1].x >> a[1].y >> b[0].x >> b[0].y >> b[1].x >> b[1].y)
	{
		if (cin.eof()) break;
		if ((a[1].y >= b[0].y && b[0].y >= a[0].y) || (a[1].y >= b[1].y && b[1].y >= a[0].y))
			cout << "YES" << endl;
		else if ((a[0].x >= b[0].x && b[0].x >= a[1].x) || (a[0].x >= b[1].x && b[1].x >= a[1].x))
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
}