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

int main() {
	double ax,ay,bx,by,cx,cy,dx,dy;
	double ex[4],ey[4];
	int i;
	while(cin >>ax >> ay >> bx >> by >> cx >> cy >> dx >> dy) {
		ex[0]=ex[1]=ax; ex[2]=ex[3]=bx; ey[0]=ey[3]=ay; ey[1]=ey[2]=by;
		for (i=0;i<4;i++) if (ex[i]>=cx && ex[i]<=dx && ey[i]>=cy && ey[i]<=dy) { cout << "YES" << endl; break;}
		if (i==4) cout << "NO" << endl;
		}
	return 0;
}