#include <iostream>
#include <algorithm>
#include <complex>
using namespace std;

typedef complex<double> P;

P a[2], b[2];

bool f() {
  if(a[1].real() < b[0].real()) return false;
  if(a[1].imag() < b[0].imag()) return false;
  if(b[1].real() < a[0].real()) return false;
  if(b[1].imag() < a[0].imag()) return false;
  return true;
}

int main() {
  while(1) {
    for(int i = 0; i < 2; ++i)
      if(cin >> a[i].real() >> a[i].imag()) ; else return 0;
    for(int i = 0; i < 2; ++i)
      if(cin >> b[i].real() >> b[i].imag()) ; else return 0;
    if(f()) cout << "YES" << endl;
    else cout << "NO" << endl;
  }
  return 0;
}