#include<iostream>
#include<string.h>
#include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<cmath>
#include<utility>
#define ll long long int
#define ld long double
#define INF 1000000000
#define EPS 0.0000000001
#define rep(i,n) for(i=0;i<n;i++)
using namespace std;
typedef pair<int, int> P;

string str;

int main()
{
  double xa1,ya1,xa2,ya2,xb1,yb1,xb2,yb2;

  while(scanf("%lf %lf %lf %lf %lf %lf %lf %lf",
	      &xa1,&ya1,&xa2,&ya2,&xb1,&yb1,&xb2,&yb2)!=EOF){

    if(xb2<xa1 || xa2<xb1 || yb2<ya1 || ya2<yb1)
      cout<<"NO"<<endl;
    else
      cout<<"YES"<<endl;

  }
}