#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <complex>
#include <string>
#include <sstream>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <functional>
#include <iostream>
#include <map>
#include <set>
using namespace std;
typedef pair<int,int> P;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-9
#define INF 2000000000
#define sz(x) ((int)(x).size())
#define fi first
#define sec second
#define EQ(a,b) (abs((a)-(b))<EPS)
int main()
{
	double xa1,ya1,xa2,ya2,xb1,yb1,xb2,yb2;
	while(cin >>xa1>>ya1>>xa2>>ya2>>xb1>>yb1>>xb2>>yb2)
	{
		if(xb2<xa1||xb1>xa2)
		{
			cout << "NO" << endl;
		}
		else if(yb1>ya2||yb2<ya1)
		{
			cout << "NO" << endl;
		}
		else
		{
			cout << "YES" << endl;
		}
	}
	return 0;
}