#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using pii = pair<int, int>;

struct Point {
  double x, y;
  Point() {}
  Point(double x, double y) : x(x), y(y) {}
};

istream& operator >> (istream& is, Point& p) {
  return is >> p.x >> p.y;
}

int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  
  Point a1, a2, b1, b2;
  while (cin >> a1 >> a2 >> b1 >> b2) {
    cout << (b2.x < a1.x || a2.x < b1.x || b2.y < a1.y || a2.y < b1.y ? "NO" : "YES") << endl;
  }
  return 0;
}
