#include<iostream>

using namespace std;

class point
{
public:
	double x,y;
	bool input()
	{
		return (cin>>x>>y);
	}
	void set(double xx, double yy)
	{
		x=xx;
		y=yy;
	}
};

class rectangles
{
public:
	point p[4];
	bool input()
	{
		bool a,b;
		a=p[0].input();
		b=p[1].input();
		p[2].set(p[0].x,p[1].y);
		p[3].set(p[1].x,p[0].y);
		return a&&b;
	}
	bool inner(point t)
	{
		if(p[0].x<=t.x&&t.x<=p[1].x&&p[0].y<=t.y&&t.y<=p[1].y)return true;
		else return false;
	}
};

int main(void)
{
	while(1)
	{
		rectangles r[2];
		for(int i=0;i<2;i++)
		{
			if(!(r[i].input()))return 0;
		}
		int c=0;
		for(int i=0;i<4;i++)
		{
			if(r[0].inner(r[1].p[i])){
				c++;
			}
		}
		if(c!=0)
		{
			cout<<"YES"<<endl;
		}
		else cout<<"NO"<<endl;
	}
}