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

int main() {
	double ax,ay,bx,by,cx,cy,dx,dy,ex,ey;
	while(cin >>ax >> ay >> bx >> by >> cx >> cy >> dx >> dy) {
		if (((ax<cx) && (ay<cy) && (bx>dx) && (by>dy)) || ((cx<ax) && (cy<ay) && (dx>bx) && (dy>by))) {
			cout << "NO" << endl; continue;
		}

	ex=fabs((ax+(bx-ax)/2)-(cx+(dx-cx)/2)); ey=fabs((ay+(by-ay)/2)-(cy+(dy-cy)/2));
	if (ex>((bx-ax)/2+(dx-cx)/2) || ey>((by-ay)/2+(dy-cy)/2)) cout << "NO" << endl; else cout << "YES" << endl;
	}
	return 0;
}