#include<iostream>
using namespace std;
struct P{
  double x;
  double y;
};
int main(){
  P a,b,c,d;
  while(cin >>a.x>>a.y>>b.x>>b.y>>c.x>>c.y>>d.x>>d.y){
    if(c.x<=b.x && a.x<=d.x && c.y<=b.y && a.y<=d.y) cout <<"YES"<<endl;
    else cout <<"NO"<<endl;
  }
  return 0;
}