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

int main() {

  double xa, ya, xb, yb, xc, yc, xd, yd;

  while( cin >> xa >> ya >> xb >> yb >> xc >> yc >> xd >> yd ) {

    double gx0 = ( xa + xb ) / 2;
    double gy0 = ( ya + yb ) / 2;
    double gx1 = ( xc + xd ) / 2;
    double gy1 = ( yc + yd ) / 2;
    double lx0 = abs( xa - xb ) / 2;
    double ly0 = abs( ya - yb ) / 2;
    double lx1 = abs( xc - xd ) / 2;
    double ly1 = abs( yc - yd ) / 2;

    if ( abs( gx1 - gx0 ) - ( lx0 + lx1 ) <= 0.00000001 && abs( gy1 - gy0 ) - ( ly0 + ly1 ) <= 0.00000001 ) {
      cout << "YES" << endl;
    }else {
      cout << "NO" << endl;
    }

  }

  return 0;

}