#include<iostream>
#include<cstdio>
using namespace std;

int main(){
	double x[2][2], y[2][2];
	while (cin >> x[0][0] >> y[0][0]){
		for (int i = 0; i < 2; i++){
			for (int j = 0; j < 2; j++){
				if (i == 0 && j == 0) continue;
				cin >> x[i][j] >> y[i][j];
			}
		}
		if (x[0][0] <= x[1][1] && y[0][0] <= y[1][1] && x[0][1] >= x[1][0] && y[0][1] >= y[1][0])
			printf("YES\n");
		else printf("NO\n");
	}
	return 0;
}