#include <iostream>
#include <algorithm>
using namespace std;

int main(){
	double xa1, ya1;
	double xa2, ya2;
	double xb1, yb1;
	double xb2, yb2;
	while(cin >> xa1 >> ya1 >> xa2 >> ya2
		>> xb1 >> yb1 >> xb2 >> yb2)
	{
		if(max(xa1,xa2) >= min(xb1,xb2) && max(xb1,xb2) >= min(xa1,xa2)
			&& max(ya1,ya2) >= min(yb1,yb2) && max(yb1,yb2) >= min(ya1,ya2))
		{
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}		
	}
	return 0;
}