#include<stdio.h>
#include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <iterator>
#include <list>
#include <map>     
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <iomanip>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define ll long long
#define ld long double
#define rep(a,t) for(int a=0;a<t;a++) 
#define forever while(true)
#define Sort(a) sort(a.begin(),a.end())
#define Reverse(a) reverse(a.begin(),a.end())
#define pb push_back
int main()
{
	cin.tie(0);
	ios::sync_with_stdio(false);
	double xa1, ya1, xa2, ya2, xb1, yb1, xb2, yb2;
	while (cin >> xa1 >> ya1 >> xa2 >> ya2 >> xb1 >> yb1 >> xb2 >> yb2) {
		bool xisout = false;
		bool yisout = false;
		if ((xa1<=xb1&&xb1 <= xa2) || (xb1<=xa1&&xa1 <= xb2)) {
			xisout = true;
		}
	    if((ya1 <= yb1&&yb1 <= ya2) || (yb1 <= ya1&&ya1 <= yb2))
		{
			yisout = true;
		}
		if (xisout&&yisout) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
		return 0;
}
