#include<iostream>
#include<iomanip>
#include<vector>
#include<queue>
#include<list>
#include<stack>
#include<algorithm>
#include<cmath>
#include<memory>

using namespace std;

const double eps = 1e-9;

class Point
{
public:
  int x, y;
  Point(){}
  Point( int x, int y ) : x(x), y(y) {}
};

class Rectangle
{
public:
  Point pl, pr;
  Rectangle(){}
  Rectangle( Point x, Point y ) : pl(x), pr(y) {}
  bool conflict( const Rectangle r );
};

bool Rectangle::conflict( const Rectangle r )
{
  if ( r.pl.x - pr.x > eps ||
       pl.x - r.pr.x > eps ||
       r.pl.y - pr.y > eps ||
       pl.y - r.pr.y > eps )
    return false;
  else
    return true;
}

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

  while( cin >> xa1 >> ya1 >> xa2 >> ya2 >> xb1 >> yb1 >> xb2 >> yb2 )
    {
      Rectangle ra( Point( xa1, ya1 ), Point( xa2, ya2 ));
      Rectangle rb( Point( xb1, yb1 ), Point( xb2, yb2 ));
      if ( ra.conflict( rb ) )
        cout << "YES" << endl;
      else
        cout << "NO" << endl;
    }
  
  return 0;
}