#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) {
	ex=abs(((bx+ax)-(dx+cx))/2); ey=abs(((by+ay)-(dy+cy))/2);
	if (ex<=((bx-ax)+(dx-cx))/2 && ey<=((by-ay)+(dy-cy))/2) cout << "YES" << endl; else cout << "NO" << endl;
	}
	return 0;
}