#include<iostream>
using namespace std;
int main(void){
  double xa1, ya1, xa2, ya2, xb1, yb1, xb2, yb2;
  double px[4], py[4];
  while(cin >> xa1 >> ya1 >> xa2 >> ya2 >> xb1 >> yb1 >> xb2 >> yb2){
    bool f = false;
    for(int i = 0;i < 4; i++)
      if(xa1 <= xb2 && xb1 <= xa2 && ya1 <= yb2 && yb1 <= ya2) f = true;
    cout << (f? "YES" : "NO") << endl;
  }
}
