#include<iostream>

using namespace std;

class Point{public:double x,y;};
class Rectangle{
public:
	Point dl,ur;
	Point dr,ul;
	bool isInside(Point p){
		if( dl.x <= p.x && p.x <= ur.x && dl.y <= p.y && p.y <= ur.y ) return true;
		else return false;
	}
	bool isInside(Rectangle r){
		if( isInside(r.dl) || isInside(r.dr) || isInside(r.ul) || isInside(r.ur) ) 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.isInside(rB) || rB.isInside(rA) )
			cout<<"YES"<<endl;
		else cout <<"NO"<<endl;
	}
	return 0;
}