#include<iostream>
#include<complex>
using namespace std;
int main(){
  complex<double> a,b,c,d;
  while(cin >>a.real()>>a.imag()>>b.real()>>b.imag()>>c.real()>>c.imag()>>d.real()>>d.imag()){
    if(d.real()<a.real() || b.real()<c.real() || d.imag()<a.imag() || b.imag()<c.imag()) cout <<"NO"<<endl;
    else cout <<"YES"<<endl;
  }
  return 0;
}