#include <iostream>
using namespace std;
int main( void )
{
	double xa1, ya1, xa2, ya2, xb1, yb1, xb2, yb2;
	while ( cin >> xa1 >> ya1 >> xa2 >> ya2 >> xb1 >> yb1 >> xb2 >> yb2 )
	{
		double x[4] = { xb1, xb2, xb2, xb1 };
		double y[4] = { yb1, yb1, yb2, yb2 };

		bool col = false;
		for ( int i = 0; i < 4; i++ )
		{
			if ( ( xa1 <= x[i] && x[i] <= xa2 ) && ( ya1 <= y[i] && y[i] <= ya2 ) )
			{
				col = true;
				break;
			}
		}

		if ( col )
			cout << "YES" << endl;
		else
			cout << "NO" << endl;

	}

	return 0;
}