#include<iostream>
#include<cstdio>
using namespace std;
int main(){
  double x1,y1,x2,y2,t_x1,t_y1,t_x2,t_y2;
  while(~scanf("%lf %lf %lf %lf %lf %lf %lf %lf",
	       &x1,&y1,&x2,&y2,&t_x1,&t_y1,&t_x2,&t_y2)){
    if(x1 <= t_x2 && t_x1 <= x2 && y1 <= t_y2 && t_y1 <= y2)
      {   
	puts("YES");
      }/*
    else if(x1 >= t_x1 && x2 <= t_x2 && y1 <= t_y1 && y2 >= t_y2){
	puts("YES");
    }
    else if(x1 <= t_x1 && x2 >= t_x2 && y1 >= t_y1 && y2 <= t_y2){
	puts("YES");
	}*/
    else puts("NO");
  }
}