#include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <algorithm>
#include <functional>
using namespace std;

int main() {
	double xa1,ya1,xa2,ya2,xb1,yb1,xb2,yb2;
	vector<string> r;
	while(cin >> xa1 >> ya1 >> xa2 >> ya2 >> xb1 >> yb1 >> xb2 >> yb2)
	{
		if ((xa1 <= xb2) && (xa2 >=  xb1) && (ya1 <= yb2) && (ya2 >=  yb1))
		{
			r.push_back("YES");
		} else {
			r.push_back("NO");
		}
	}
	for (int i=0; i<r.size(); i++)
	{
		cout << r[i] << endl;
	}
}