#include <iostream>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <bitset>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>

#define X first
#define Y second
using namespace std;

struct rect{
	rect(){}
	double leftX;
	double leftY;
	double rightX;
	double rightY;
};

int main(){
	rect a, b;
	while(cin >> a.leftX >> a.leftY >> a.rightX >> a.rightY >> b.leftX >> b.leftY >> b.rightX >> b.rightY){
		if(cin.eof()) break;
		if(a.leftX>b.rightX||a.rightX<b.leftX||a.rightY<b.leftY||a.leftY>b.rightY) cout << "NO" << endl;
		else cout << "YES" << endl;
	}
	return 0;
}