#include<iostream>

using namespace std;

typedef struct{
	double x, y;
}_z;

int main(){

	_z p[4];
	
	while(cin >> p[0].x >> p[0].y){
		for(int i=1; i<4; i++){
			cin >> p[i].x >> p[i].y;
		}
		
		if(p[3].x < p[0].x || p[2].x > p[1].x || p[2].y > p[1].y || p[3].y < p[0].y){
			cout << "NO" << endl;
		}
		else cout << "YES" << endl;
		
	}
	
	return 0;

}