#include<iostream>

using namespace std;

struct point{
	double x;
	double y;
};

struct rect{
	point LB;
	point RT;
};

istream& operator >> ( istream& s , rect& d );
bool isIntersection( const rect& a , const rect& b );

int main(void)
{
	rect a, b;

	while(1)
	{
		cin >> a >> b;
		if( cin.eof() ) break;
		cout << ( isIntersection( a , b ) ? "YES" : "NO" ) << endl;
	}

	return 0;
}

istream& operator >> ( istream& s , rect& d )
{
	return s >> d.LB.x >> d.LB.y >> d.RT.x >> d.RT.y;
}

bool isIntersection( const rect& a , const rect& b )
{
	if( a.LB.y > b.RT.y || a.RT.y < b.LB.y || a.LB.x > b.RT.x || a.RT.x < b.LB.x )
	{
		return false;
	}
	else
	{
		return true;
	}
}