#include <iostream>

using namespace std;

void swap(double& x, double& y)
{
	double tmp = x; x = y; y = tmp;
}

int main()
{
	double xa[2], ya[2], xb[2], yb[2];
	
	while ( cin >> xa[0] >> ya[0] >> xa[1] >> ya[1] >> xb[0] >> yb[0] >> xb[1] >> yb[1] ) {
		if ( (xb[1] < xa[0]) || (xa[1] < xb[0]) || (yb[1] < ya[0]) || (ya[1] < yb[0]) ) cout << "NO";
		else cout << "YES";
		cout << endl;
	}
	
	return 0;
}