#include<iostream>

using namespace std;

void Swap(double&, double&);
int Calculate(double, double, double, double, double, double);

int main(){
  int a, b, c, d;
  double xa1, ya1, xa2, ya2, xb1, yb1, xb2, yb2;

  while(cin >> xa1 >> ya1 >> xa2 >> ya2 >> xb1 >> yb1 >> xb2 >> yb2){
    if(xa1 > xa2)
      Swap(xa1, xa2);
    if(ya1 > ya2)
      Swap(ya1, ya2);

    a = Calculate(xa1, ya1, xa2, ya2, xb1, yb1);
    b = Calculate(xa1, ya1, xa2, ya2, xb1, yb2);
    c = Calculate(xa1, ya1, xa2, ya2, xb2, yb1);
    d = Calculate(xa1, ya1, xa2, ya2, xb2, yb2);

    if(a == 1 || b == 1 || c == 1 || d == 1)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }

  return 0;
}

void Swap(double& x, double& y){
  double z;
  z = x;
  x = y;
  y = z;
}

int Calculate(double x1, double y1, double x2, double y2, double x, double y){
  if(x >= x1 && x <= x2 && y >= y1 && y <= y2)
    return 1;
  else
    return 0;
}