#include <iostream>
#include <algorithm>
#include <string>
#include <sstream>
using namespace std;

double x[4], y[4];

bool solve() {
  if(x[0] > x[1]) swap(x[0], x[1]);
  if(y[0] > y[1]) swap(y[0], y[1]);
  if(x[2] > x[3]) swap(x[2], x[3]);
  if(y[2] > y[3]) swap(y[2], y[3]);
  if(x[1] < x[2]) return false;
  if(y[1] < y[2]) return false;
  if(x[3] < x[0]) return false;
  if(y[3] < y[0]) return false;
  return true;
}

int main() {
  string line;
  while(getline(cin, line)) {
    stringstream ss;
    ss << line;
    for(int i = 0; i < 4; ++i) ss >> x[i] >> y[i];
    cout << (solve() ? "YES" : "NO") << endl;
  }
  return 0;
}