#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;

int main(void){
  double x[4],y[4];
  int i;
  int flag;

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

    flag = 1;
    if(x[3] < x[0] || x[1] < x[2])flag = 0;
    if(y[3] < y[0] || y[1] < y[2])flag = 0;

    if(flag)printf("YES\n");
    else printf("NO\n");
  }    
  return 0;
}