#include <iostream>
#include<vector>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<string>
#include<sstream>
#include<cmath>
#include<numeric>
#include<map>
#include<stack>
#include<queue>
#include<random>
using namespace std;
int inf = 1e9;

int main() {

  double al;
  double ar;
  double au;
  double ad;
  double bl;
  double br;
  double bu;
  double bd;
  while( cin >> al >> ad >> ar >> au >> bl >> bd >> br >> bu ){
    bool f = false;
    if( al <= bl && bl <= ar && ad <= bd && bd <= au ) f = true;
    if( al <= bl && bl <= ar && ad <= bu && bu <= au ) f = true;
    if( al <= br && br <= ar && ad <= bd && bd <= au ) f = true;
    if( al <= br && br <= ar && ad <= bu && bu <= au ) f = true;
    cout << ( f ? "YES" : "NO" ) << endl;
  }

  return 0;
}




// EOF