//Intersection of Rectangles
#include<bits/stdc++.h>
using namespace std;

int main(){
  complex<double> a1, a2, b1, b2;
  while(cin>>a1.real()>>a1.imag()>>a2.real()>>a2.imag()>>b1.real()>>b1.imag()>>b2.real()>>b2.imag()){
    if(b2.real()<a1.real() || a2.real()<b1.real() || b2.imag()<a1.imag() || a2.imag()<b1.imag())cout<<"NO"<<endl;
    else cout<<"YES"<<endl;
  }
  return 0;
}