#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, y, ans = 0, f = 0;
  vector<pair<int, int>> v;
  char arr[206][206];
  memset(arr, '.', sizeof(arr));
  for (int i = 0; i < 4; i++) {
    cin >> x >> y;
    v.push_back({x, y});
  }
  sort(v.begin(), v.end());
  x = v[1].second - v[0].second;
  for (int i = v[0].first; i <= v[0].first + x; i++) {
    for (int j = v[0].second; j <= v[1].second; j++) {
      arr[102 + i][102 + j] = '#';
    }
  }
  for (int i = 0; i < 4; i++) {
    cin >> x >> y;
    v[i].first = x;
    v[i].second = y;
  }
  sort(v.begin(), v.end());
  x = v[0].first;
  y = v[3].first;
  int c = -1;
  for (int i = x; i <= y; i++) {
    if (c == v[2].second - v[0].second) {
      f = 1;
    }
    if (f) {
      c--;
    } else {
      c++;
    }
    for (int j = v[0].second - c; j <= v[0].second + c; j++) {
      if (arr[102 + i][102 + j] == '#') {
        ans = 1;
        break;
      }
    }
    if (ans == 1) {
      break;
    }
  }
  if (ans == 1) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
}
