#include <iostream>
#include <algorithm>
#include <functional>
#include <vector>
#include <cstdio>
#include <string>
#include <cmath>
#include <cfloat>
#include <map>
using namespace std;
int main(){
	
	double xa1,xa2,ya1,ya2;
	double xb1,xb2,yb1,yb2;
	
	while(cin>>xa1>>ya1>>xa2>>ya2>>xb1>>yb1>>xb2>>yb2){
		if(xa1<=xb2&&xa2>=xb1&&ya1<=yb2&&ya2>=yb1)
			cout<<"YES"<<endl;
		else
			cout<<"NO"<<endl;
	}
	
	
}