#include<iostream>

using namespace std;

class Point{
public:
	double x,y;
	bool isRight(Point p){
		if( p.x >= x ) return true;
		else return false;
	}
	bool isLeft(Point p){
		if( p.x <= x ) return true;
		else return false;
	}
	bool isUp(Point p){
		if( p.y >= y ) return true;
		else return false;
	}
	bool isDown(Point p){
		if( p.y <= y ) return true;
		else return false;
	}
};
class Rectangle{
public:
	Point dl,ur;
	Point dr,ul;
	bool isInside(Point p){
		if( dl.isRight( p ) && ur.isLeft( p ) && dl.isUp( p ) && ur.isDown( p ) ) return true;
		else return false;
	}
	bool isIntersected(Rectangle r){
		if( isInside(r.dl) || isInside(r.dr) || isInside(r.ul) || isInside(r.ur) ) return true;
		else if( r.dl.isLeft( dl ) && r.dr.isRight( dr ) && r.ur.isDown( dl ) && r.dl.isUp( dl ) ) return true;
		else return false;
	}
	void Complement(void){
		dr.x = ur.x;
		dr.y = dl.y;
		ul.x = dl.x;
		ul.y = ur.y;
	}
};

int main(void){
	while( true ){
		Rectangle rA, rB;

		cin >> rA.dl.x >> rA.dl.y >> rA.ur.x >> rA.ur.y >> rB.dl.x >> rB.dl.y >> rB.ur.x >> rB.ur.y;
		rA.Complement();
		rB.Complement();
		if( cin.eof() )break;
		if( rA.isIntersected(rB) || rB.isIntersected(rA) )
			cout<<"YES"<<endl;
		else cout <<"NO"<<endl;
	}
	return 0;
}