#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <bitset>
#include <algorithm>
#include <numeric>
#include <complex>
#include <functional>
#include <utility>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <cctype>

using namespace std;

#define dump(n) cout<<"# "<<#n<<"="<<(n)<<endl
#define debug(n) cout<<__FILE__<<","<<__LINE__<<": # "<<#n<<"="<<(n)<<endl
#define repi(i,a,b) for(int i=int(a);i<int(b);i++)
#define rep(i,n) repi(i,0,n)
#define iter(c) __typeof((c).begin())
#define tr(c,i) for(iter(c) i=(c).begin();i!=(c).end();i++)
#define allof(c) (c).begin(),(c).end()
#define mp make_pair

typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef pair<int,int> pii;

double le(double a,double b)
{
	return a<b+1e-10;
}

string solve(double x[],double y[])
{
	int xi[]={0,1,0,1};
	int yi[]={0,0,1,1};
	rep(k,4)
		//if(x[2]<=x[xi[k]] && x[xi[k]]<=x[3] && y[2]<=y[yi[k]] && y[yi[k]]<=y[3])
		if(le(x[2],x[xi[k]]) && le(x[xi[k]],x[3]) && le(y[2],y[yi[k]]) && le(y[yi[k]],y[3]))
			return "YES";
	rep(k,4){
		xi[k]+=2;
		yi[k]+=2;
	}
	rep(k,4)
		if(le(x[0],x[xi[k]]) && le(x[xi[k]],x[1]) && le(y[0],y[yi[k]]) && le(y[yi[k]],y[1]))
			return "YES";
	return "NO";
}

int main()
{
	for(double x[4],y[4];cin>>x[0]>>y[0];){
		repi(i,1,4)
			cin>>x[i]>>y[i];
		cout<<solve(x,y)<<endl;
	}
	
	return 0;
}