#include<iostream>

using namespace std;

typedef struct{
  double x;
  double y;
}Point;

Point a[2],b[4];

int check(){
  for(int i = 0; i < 4; i++){
    if(b[i].x >= a[0].x && b[i].x <= a[1].x && b[i].y >= a[0].y && b[i].y <= a[1].y)
      return 1;
  }
  return 0;
}

int main(){
  int status = 0;
  while(1){
    for(int i = 0; i < 2; i++){
      if(!(cin >> a[i].x >> a[i].y)) status = 1;
    }
    for(int i = 0; i < 2; i++){
      if(!(cin >> b[i].x >> b[i].y)) status = 1;
    }
    if(status) break;
    b[2].x = b[0].x;
    b[2].y = b[1].y;
    b[3].x = b[1].x;
    b[3].y = b[0].y;
    if(check()) cout << "YES" << endl;
    else cout << "NO" << endl;
  }
  return 0;
}