#include <iostream>
#include <string>

using namespace std;

int main() {
  double xa1, ya1, xa2, ya2, xb1, yb1, xb2, yb2;
  while (cin >> xa1 >> ya1 >> xa2 >> ya2 >> xb1 >> yb1 >> xb2 >> yb2) {
    bool a = (xb1 < xa1) && (xb2 < xa1);
    bool b = (xa2 < xb1) && (xa2 < xb2);
    bool c = (yb1 < ya1) && (yb2 < ya1);
    bool d = (ya2 < yb1) && (ya2 < yb2);
    string ans = (a || b || c || d) ? "NO" : "YES";
    cout << ans << endl;
  }
}
