#include <iostream>
#include <cstdio>
#include <cstring>
#include <sstream>
#include <algorithm>
#include <math.h>
#include <map>
#include <functional>
#include <iomanip>
#include <vector>
#include <queue>
#include <stack>
#include <set>
#include <typeinfo>
#define PI 3.14159265359
#define INF 99999999
#define rep(i, n) for(int i=0; i<n; i++)
#define REP(n) rep(i, n)
#define pb push_back
#define mp make_pair
typedef long long ll;
using namespace std;
typedef pair<int, int> P;

double xa1, ya1, xa2, ya2, xb1, yb1, xb2, yb2;

int main()
{
	while (cin>>xa1>>ya1>>xa2>>ya2>>xb1>>yb1>>xb2>>yb2)
	{
		bool ans = false;
		if ((xa1 <= xb1 && xb1 <= xa2) || (xa1 <= xb2 && xb2 <= xa2))
		{
			if ((ya1 <= yb1 && yb1 <= ya2) || (ya1 <= yb2 && yb2 <= ya2))
			{
				ans = true;
			}
		}
		cout << (ans ? "YES" : "NO") << endl;
	}
	
	return 0;
}