#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <utility>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <map>
#include <set>
 
using namespace std;
 
#define pb(n)	push_back(n)
#define mp(n,m) make_pair(n,m)
#define fi 	first
#define se 	second
#define all(r) r.begin(),r.end()

#define rep(i,n) for(int i=0; i<(n); i++)
#define repc(i,a,b) for(int i=(a); i<=(b); i++)

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
 
const int IMAX=((1<<30)-1)*2+1;
const double EPS=1e-10;
//int mod=1000000007;



int main(){
	double xa1,ya1,xa2,ya2,xb1,yb1,xb2,yb2;
	while(cin>>xa1>>ya1>>xa2>>ya2>>xb1>>yb1>>xb2>>yb2){
		double c1x=(xa1+xa2)/2.0,c1y=(ya1+ya2)/2.0;
		double c2x=(xb1+xb2)/2.0,c2y=(yb1+yb2)/2.0;
		double r1x=fabs(xa1-c1x),r1y=fabs(ya1-c1y);
		double r2x=fabs(xb1-c2x),r2y=fabs(yb1-c2y);
		// c1x=fabs(c1x);
		// c1y=fabs(c1y);
		// c2x=fabs(c2x);
		// c2y=fabs(c2y);
		if((fabs(c1x-c2x)<=r1x+r2x+EPS)&&(fabs(c1y-c2y)<=r1y+r2y+EPS))cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
		//cout<<(r1x+r2x-fabs(c1x-c2x))<<" "<<(r1y+r2y-fabs(c1y-c2y))<<endl;
		// cout<<"c1("<<c1x<<","<<c1y<<") c2("<<c2x<<","<<c2y<<")"<<endl;
		// cout<<"r1("<<r1x<<","<<r1y<<") r2("<<r2x<<","<<r2y<<")"<<endl;
	}
}