#include<iostream>
#include<cstdio>
#include<cmath>
#define EPS 1e-10
using namespace std;

int main(void){
  double x[4],y[4];
  int i;
  int flag;
  int cx[] = {0,1,0,1};
  int cy[] = {1,1,0,0};
  int dx[] = {2,3,2,3};
  int dy[] = {3,3,2,2};

  while(scanf("%lf %lf ",&x[0],&y[0])!=EOF){
    for(i=1;i<4;i++)scanf("%lf %lf ",&x[i],&y[i]);

    flag = 0;
    for(i=0;i<4;i++){
      if(flag)break;
      if(x[2] < x[dx[i]] + EPS && x[cx[i]] < x[3] + EPS){
	if(y[2] < y[cy[i]] + EPS && y[cy[i]] < y[3] + EPS){
	  flag = 1;
	}
      }
    }
    for(i=0;i<4;i++){
      if(flag)break;
      if(x[0] < x[dx[i]] + EPS && x[dx[i]] < x[1] + EPS){
	if(y[0] < y[dy[i]] + EPS && y[dy[i]] < y[1] + EPS){
	  flag = 1;
	}
      }
    }
    if(flag)printf("YES\n");
    else printf("NO\n");
  }

  return 0;
}