#include<iostream>
#define x first
#define y second
using namespace std;
int main(){
  pair<double,double>a1,a2,b1,b2;
  while(cin>>a1.x>>a1.y>>a2.x>>a2.y>>b1.x>>b1.y>>b2.x>>b2.y){
    bool f=0;  
    if((a1.x<=b2.x&&b2.x<=a2.x||a1.x<=b1.x&&b1.x<=a2.x)
     &&(a1.y<=b2.y&&b2.y<=a2.y||a1.y<=b1.y&&b1.y<=a2.y))f=1;
    if(f==1)cout<<"YES"<<endl;
    else cout<<"NO"<<endl;
  }
  return 0;
}