#include <iostream>
using namespace std;
 
int main() {
 double ax,ay,bx,by,cx,cy,dx,dy;
   
   while(cin>>ax>>ay>>bx>>by>>cx>>cy>>dx>>dy){
       if(cx > bx || ax > dx || cy > by || ay > dy){
           cout<<"NO"<<endl;
       }
       else{
           cout<<"YES"<<endl;
       }
   }
  return 0;
}
