#include <bits/stdc++.h>
using namespace std;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return true;
  }
  return false;
}
const int mod = 1000000007, MAX = 200005, INF = 1 << 30;
void update(pair<int, int> &a, int b) {
  chmin(a.first, b);
  chmax(a.second, b);
}
int main() {
  std::ifstream in("text.txt");
  std::cin.rdbuf(in.rdbuf());
  cin.tie(0);
  ios::sync_with_stdio(false);
  pair<int, int> lx, ly, rx, ry;
  lx = ly = rx = ry = make_pair(INF, -INF);
  for (int t = 0; t < 4; t++) {
    int x, y;
    cin >> x >> y;
    update(lx, x);
    update(ly, y);
  }
  for (int t = 0; t < 4; t++) {
    int x, y;
    cin >> x >> y;
    update(rx, x);
    update(ry, y);
  }
  bool ok = false;
  for (int x = lx.first; x <= lx.second; x++) {
    for (int y = ly.first; y <= ly.second; y++) {
      if (x < rx.first || x > rx.second) continue;
      if (y < ry.first || y > ry.second) continue;
      int s = abs((rx.first + rx.second) / 2 - x);
      int t = abs((ry.first + ry.second) / 2 - y);
      if (s + t <= (rx.second - rx.first) / 2) ok = true;
    }
  }
  if (ok)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
