#include <cstdio>
#include <algorithm>
#include <iostream>
#include <vector>
#include <string.h>
#include <math.h>
#include <time.h>
#include <stdlib.h>
using namespace std;



int main(){
	double x[4],y[4],big,sml;
	bool a,b;
	while( scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x[0],&y[0],&x[1],&y[1],&x[2],&y[2],&x[3],&y[3]) != EOF){
		if(x[3]<x[0] || x[2]>x[1] || y[3]<y[0] || y[2]>y[1] ) printf("NO\n");
		else printf("YES\n");
	}
			
	return 0;
}
