#include <iostream>
using namespace std;

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