#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9 + 7;
const long long longinf = 1LL << 60;
const long long mod = 1e9 + 7;
const long long mod2 = 998244353;
const long double eps = 1e-10;
template <typename T1, typename T2>
inline void chmin(T1 &a, T2 b) {
  if (a > b) a = b;
}
template <typename T1, typename T2>
inline void chmax(T1 &a, T2 b) {
  if (a < b) a = b;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  vector<pair<int, int>> P(4), Q(4);
  for (int i = (int)(0); i < (int)(4); i++) cin >> P[i].first >> P[i].second;
  for (int i = (int)(0); i < (int)(4); i++) cin >> Q[i].first >> Q[i].second;
  bool ok = false;
  int mnPx = inf, mxPx = -inf, mnPy = inf, mxPy = -inf;
  for (int i = (int)(0); i < (int)(4); i++) {
    chmin(mnPx, P[i].first);
    chmax(mxPx, P[i].first);
    chmin(mnPy, P[i].second);
    chmax(mxPy, P[i].second);
  }
  int mnQx = inf, mxQx = -inf, mnQy = inf, mxQy = -inf;
  for (int i = (int)(0); i < (int)(4); i++) {
    auto [x, y] = Q[i];
    int xtrans = x + y;
    int ytrans = x - y;
    chmin(mnQx, xtrans);
    chmax(mxQx, xtrans);
    chmin(mnQy, ytrans);
    chmax(mxQy, ytrans);
  }
  for (int x = -100; x <= 100; x++) {
    for (int y = -100; y <= 100; y++) {
      if (mnPx <= x && x <= mxPx && mnPy <= y && y <= mxPy) {
        int xtrans = x + y;
        int ytrans = x - y;
        if (mnQx <= xtrans && xtrans <= mxQx && mnQy <= ytrans &&
            ytrans <= mxQy) {
          ok = true;
        }
      }
    }
  }
  cout << (ok ? "YES" : "NO") << '\n';
  return 0;
}
