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

int main() {
	double ax,ay,bx,by,cx,cy,dx,dy;
	while(cin >>ax >> ay >> bx >> by >> cx >> cy >> dx >> dy) {
	if ((bx<cx) || (dx<ax) || (by<cy) || (dy<ay)) cout << "NO" << endl; else cout << "YES" << endl;
	}
	return 0;
}