#include "bits/stdc++.h"

using namespace std;

typedef vector<double> vi;
typedef pair<double,double> pii;
typedef long long ll;

#define dump(x)  cerr << #x << " = " << (x) << endl
#define rep(i,n) for(int i=0;i<(n);i++)
#define all(a)  (a).begin(),(a).end()
#define pb push_back

#define EPS 1e-5

bool in(double xa1,double ya1,double xa2,double ya2, double x,double y ){
	if( xa1<=x+EPS && x-EPS<=xa2 && ya1<=y+EPS && y-EPS<=ya2 )return true;
	else return false;
}

bool solve(double xa1,double ya1,double xa2,double ya2,double xb1,double yb1,double xb2,double yb2){
	double xb3=xb1,yb3=yb2,xb4=xb2,yb4=yb1;

	if( in(xa1,ya1,xa2,ya2 , xb1,yb1 ) )return true;
	if( in(xa1,ya1,xa2,ya2 , xb2,yb2 ) )return true;
	if( in(xa1,ya1,xa2,ya2 , xb3,yb3 ) )return true;
	if( in(xa1,ya1,xa2,ya2 , xb4,yb4 ) )return true;
	return false;
}


int main(){
	double xa1,ya1,xa2,ya2;
	double xb1,yb1,xb2,yb2;
	while(cin>>xa1>>ya1>>xa2>>ya2>>xb1>>yb1>>xb2>>yb2){
		if( solve(xa1,ya1,xa2,ya2,xb1,yb1,xb2,yb2) )cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}
	return 0;
}