#include<iostream>
#include<algorithm>
#include<vector>
#include<stack>
#include<queue>
#include<cstdio>
#include<climits>
#include<cmath>
#include<cstring>
#include<string>
#include<complex>
#include<map>

#define f first
#define s second

#define REP(i,n) for(int i=0; i<(int)(n); i++)
#define FOR(i,c) for(__typeof((c).begin()) i=(c).begin(); i!=(c).end(); i++)
#define ALL(c) (c).begin(), (c).end()
#define EPS (1e-10)
using namespace std;

typedef unsigned int uint;
typedef long long ll;
typedef complex<double> P;

int main(){
  double ldx,ldy,rux,ruy;
  while(cin>>ldx>>ldy>>rux>>ruy){
    double x[2],y[2];
    int ans = 0;
    ldx -= EPS; ldy -= EPS;
    rux += EPS; ruy += EPS;
    cin>>x[0]>>y[0]>>x[1]>>y[1];
    REP(i,2) REP(j,2){
      double xx = x[i];
      double yy = y[j];
      if(xx >= ldx && xx <= rux &&
	 yy >= ldy && yy <= ruy)
	ans++;
    }
    if(ans != 0)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;

  }
  return 0;
}