#include<iostream>
using namespace std;
int main(){
	double a[2],b[2],c[2],d[2];
	while(cin >>a[0]>>a[1]>>b[0]>>b[1]>>c[0]>>c[1]>>d[0]>>d[1]){
		if(a[0]<=d[0] && b[0]>=c[0] && a[1]<=d[1] && b[1]>=c[1]){cout <<"YES"<<endl;}
		else{cout <<"NO"<<endl;}
	}
	return 0;
}