#include<stdio.h>
#include<string>
#include<stdlib.h>
#include<math.h>
#include<iostream>
#include<vector>
#include<algorithm>
#include<numeric>
#include<string.h>
#include<map>
#include<queue>

using namespace std;

typedef pair<int,int> pii;

#define rep(i,j) for(int i=0;i<(j);i++)
#define reps(i,j,k) for(int i=j;i<=k;i++)
#define in(i,j,k) ((i)>=(j)&&(i)<=(k))


int main(){
	double x[4],y[4];
	while(~scanf("%lf%lf%lf%lf%lf%lf%lf%lf",x,y,x+1,y+1,x+2,y+2,x+3,y+3)){
		x[0]=max(x[0],x[2]);
		y[0]=max(y[0],y[2]);
		x[1]=min(x[1],x[3]);
		y[1]=min(y[1],y[3]);
		puts(x[0]>x[1] || y[0]>y[1]?"NO":"YES");
	}
	return 0;
}