#include <iostream>

using namespace std;

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

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

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