#include<iostream>
using namespace std;

int main(){
	double xa,ya,xb,yb,xc,yc,xd,yd;
	while(cin>>xa>>ya>>xb>>yb>>xc>>yc>>xd>>yd){
		if(xa<=xd&&ya<=yd&&xc<=xb&&yc<=yb)cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}
	return 0;
}