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

const double EPS = 1e-10;

bool solve(double xa1, double ya1, double xa2, double ya2, double tx, double ty)
{
  if (xa1 <= tx && tx <= xa2 && ya1 <= ty && ty <= ya2)
    return true;
  return false;
}

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