#include <iostream>
#include <algorithm>
using namespace std;

int main() {
  double xa1,ya1,xa2,ya2,xb1,yb1,xb2,yb2;
  while(cin >> xa1 >> ya1 >> xa2 >> ya2 >> xb1 >> yb1 >> xb2 >> yb2) {
    if(xa1 < xb1) {
      swap(xa1,xb1);
      swap(ya1,yb1);
      swap(xa2,xb2);
      swap(ya2,yb2);
    }
    if(yb2 < ya1)
      cout << "NO" << endl;
    else if((xa1 <= xb2) && (yb1 <= ya2))
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}