#include <iostream>

using namespace std;

bool judge(double x1, double y1, double x2, double y2, double x3, double y3)
{
	if(x2 <= x1 && x1 <= x3 && y2 <= y1 && y1 <= y3)
	{
		return(true);
	}
	else
	{
		return(false);
	}
}

void solve()
{
	double xa1, ya1, xa2, ya2, xb1, yb1, xb2, yb2;
	while(cin >> xa1 >> ya1 >> xa2 >> ya2 >> xb1 >> yb1 >> xb2 >> yb2)
	{
		if(judge(xa1, ya1, xb1, yb1, xb2, yb2))
		{
			cout << "YES" << endl;
			continue;
		}
		if(judge(xa1, ya2, xb1, yb1, xb2, yb2))
		{
			cout << "YES" << endl;
			continue;
		}
		if(judge(xa2, ya1, xb1, yb1, xb2, yb2))
		{
			cout << "YES" << endl;
			continue;
		}
		if(judge(xa2, ya2, xb1, yb1, xb2, yb2))
		{
			cout << "YES" << endl;
			continue;
		}

		if(judge(xb1, yb1, xa1, ya1, xa2, ya2))
		{
			cout << "YES" << endl;
			continue;
		}
		if(judge(xb1, yb2, xa1, ya1, xa2, ya2))
		{
			cout << "YES" << endl;
			continue;
		}
		if(judge(xb2, yb1, xa1, ya1, xa2, ya2))
		{
			cout << "YES" << endl;
			continue;
		}
		if(judge(xb2, yb2, xa1, ya1, xa2, ya2))
		{
			cout << "YES" << endl;
			continue;
		}
		cout << "NO" << endl;
	}
}

int main()
{
	solve();
	return(0);
}