#include<iostream>
#include<utility>
#include<cmath>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
using namespace std;

int main(){
	pair<double,double> pa[2],pb[2];
	while(cin>>pa[0].first>>pa[0].second){
		cin>>pa[1].first>>pa[1].second;
		rep(i,2)cin>>pb[i].first>>pb[i].second;
		bool check1=(max(pa[0].first,pa[1].first)<min(pb[0].first,pb[1].first) || max(pb[0].first,pb[1].first)<min(pa[0].first,pa[1].first) );
		bool check2=(max(pa[0].second,pa[1].second)<min(pb[0].second,pb[1].second) || max(pb[0].second,pb[1].second)<min(pa[0].second,pa[1].second) );
		if(check1 || check2)cout<<"NO"<<endl;
		else cout<<"YES"<<endl;
	}
	return 0;
}