#include <cstdio>

using namespace std;

int main() {
  double xa1, ya1, xa2, ya2, xb1, yb1, xb2, yb2;
  while (scanf("%lf%lf%lf%lf%lf%lf%lf%lf", &xa1, &ya1, &xa2, &ya2, &xb1, &yb1, &xb2, &yb2) == 8)
    if (xb2 < xa1 || xa2 < xb1 || yb2 < ya1 || ya2 < yb1)
      puts("NO");
    else
      puts("YES");
  return 0;
}