#include<iostream>

using namespace std;

class Point{public:double x,y;};
class Rectangle{
public:
	Point dl,ur;
	bool isInside(Point p){
		if( dl.x <= p.x && p.x <= ur.x && dl.y <= p.y && p.y <= ur.y) return true;
		return false;
	}
};

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;
		if(cin.eof())break;
		if( rA.isInside(rB.dl) || rA.isInside(rB.ur) || rB.isInside(rA.dl) || rB.isInside(rA.ur))
			cout<<"YES"<<endl;
		else cout <<"NO"<<endl;
	}
	return 0;
}