#include <iostream>
using namespace std;

int main(){
   double xA,yA,xB,yB,xC,yC,xD,yD;
   while(cin >> xA >> yA >> xB >> yB >> xC >> yC >> xD >> yD){
      if(xA<=xD && yA<=yD && xC<=xB && yC<=yB)cout << "YES" << endl;
      else cout << "NO" << endl;
   }
   return 0;
}