#include <iostream>
using namespace std;

int main() {
  double x,xx,y,yy,a,aa,b,bb;
  while(cin>>x>>y>>xx>>yy>>a>>b>>aa>>bb){
    string str[2]={"YES","NO"};
    bool ans=0;
    if((aa<x || xx<a))ans=1;
    if((bb<y || yy<b)) ans=1;
    cout << str[ans]<<endl;
  }
  return 0;
}