#define _USE_MATH_DEFINES
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <cfloat>
#include <ctime>
#include <cassert>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <numeric>
#include <list>


#ifdef _DEBUG
#define typeof(X) std::identity<decltype(X)>::type //C++0x (for vs2010)
#else
#define typeof(X) __typeof__(X) // for gcc
#endif

using namespace std;
static const double EPS = 1e-6;
typedef long long ll;
const int MODULO = 1000000007;
const int INF = 100000000; //1e8

typedef long long ll;
typedef pair<int,int> Pii;
typedef pair<ll,ll> Pll;
typedef complex<double> Cd;


double _x1,_x2,_x3,_x4,__y1,__y2,__y3,__y4;

bool solve()
{
	if(_x2 < _x3 || _x4 < _x1){
		return false;
	} else if(__y2 < __y3 || __y4 < __y1){
		return false;
	}

	return true;
}

int main(){
	while(cin>>_x1>>__y1>>_x2>>__y2>>_x3>>__y3>>_x4>>__y4){
		cout << (solve() ? "YES" : "NO") << endl;
	}
	return 0;
}