#include<iostream>
using namespace std;
int main(){

  double ax,ay,bx,by,cx,cy,dx,dy;
  while(cin>>ax>>ay>>bx>>by>>cx>>cy>>dx>>dy){
    if(ay>dy||by<cy||bx<cx||dx<ax)
      cout << "NO" << endl;
    else
      cout << "YES" << endl;

  }

}
//ax <= dx && ay <= dy && cx <= bx && cy <= by