#include <iostream>

using namespace std;

struct point{
  double x,y;
};
struct rect{
  point p1,p2;
};

bool IsIntersect(const rect &A,const rect &B){
  return (A.p1.x<=B.p2.x&&B.p1.x<=A.p2.x)&&
         (A.p1.y<=B.p2.y&&B.p1.y<=A.p2.y);
}
int main(){
  rect A,B;
  while(cin>>A.p1.x>>A.p1.y>>A.p2.x>>A.p2.y
           >>B.p1.x>>B.p1.y>>B.p2.x>>B.p2.y){
    if(IsIntersect(A,B)){
      cout<<"YES"<<endl;
    }else{
      cout<<"NO"<<endl;
    }
  }
}