#include<iostream>
using namespace std;

class Pos
{
public:
	double x, y;
};

bool isHit(Pos p1, Pos p2, Pos p3, Pos p4)
{
	if (p1.x > p4.x) return false;
	if (p2.x < p3.x) return false;
	if (p1.y > p4.y) return false;
	if (p2.y < p3.y) return false;

	return true; 
}

int main(){

	Pos p[4];

	while (cin >> p[0].x >> p[0].y){
		for (int i = 1; i < 4; i++)
		{
			cin >> p[i].x >> p[i].y;
		}
		

		if (isHit(p[0], p[1], p[2], p[3])) cout << "YES" << endl;
		else cout << "NO" << endl;

	}

	return 0;
}