#include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#include <cmath>
#include <stack>
#include <vector>
#include <map>
#include <set>
#include <iostream>
#include <climits>
#include <cfloat>


using namespace std;

double distance(double x1, double y1, double x2, double y2)
{
	double dx = x1-x2;
	double dy = y1-y2;
	return sqrt(dx*dx+dy*dy);
}

int main()
{
	double x[4], y[4];
	while (scanf("%lf %lf %lf %lf %lf %lf %lf %lf\n"
		, x, y, x+1, y+1, x+2, y+2, x+3, y+3) != EOF)
	{
		if (x[0] <= x[3] && x[1] >= x[2]
		&& y[0] <= y[3] && y[1] >= y[2])
			puts("YES");
		else
			puts("NO");
	}

	return 0;
}