#include <iostream>
#include <math.h>
using namespace std;

int main()
{
	double x[4];
	double y[4];

	while (true)
	{
		for (int i = 0; i < 4; i++)
		{
			if (!(cin >> x[i] >> y[i])) return 0;
		}

		if (x[0] > x[3]) cout << "NO" << endl;
		else if (x[1] < x[2]) cout << "NO" << endl;
		else if (y[0] > y[3]) cout << "NO" << endl;
		else if (y[1] < y[2]) cout << "NO" << endl;
		else cout << "YES" << endl;
	}

	return 0;
}