#include<iostream>
using namespace std;

int main(){
double A,B,C,D,E,F,G,H,I;
while(cin>>A>>B>>C>>D>>E>>F>>G>>H){
if(A<C){I=A; A=C; C=I;}
if(B<D){I=B; B=D; D=I;}
if(E<G){I=E; E=G; G=I;}
if(F<H){I=F; F=H; H=I;}
if(E<C||G>A||F<D||H>B)cout<<"NO"<<endl;
else cout<<"YES"<<endl;}}