#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main(){

  double a,b,c,d, e,f,g,h;

  while(cin>>a){
    cin >>b>>c>>d>>e>>f>>g>>h;

    if(g<a||c<e||h<b||d<f)
      cout << "NO" << endl;
    else
      cout << "YES" << endl;
  } 

  return 0;
}