#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
long long y11, y2, x1, x2;
vector<pair<long long, long long> > v, vv;
map<pair<long long, long long>, long long> mp;
set<long long> s1, s2;
bool fun(long long x, long long y) {
  if (x >= x1 && x <= x2 && y >= y11 && y <= y2) return 1;
  return 0;
}
long long dis(long long a, long long b, long long c, long long d) {
  long long e = abs(a - c) + abs(b - d);
  return e;
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long a = 4, b = 4;
  while (a--) {
    long long x, y;
    cin >> x >> y;
    v.push_back({x, y});
  }
  while (b--) {
    long long x, y;
    cin >> x >> y;
    vv.push_back({x, y});
    mp[{x, y}] = 1;
  }
  sort(v.begin(), v.end());
  y11 = v[0].second;
  y2 = v[1].second;
  x1 = v[0].first;
  x2 = v[2].first;
  a = (vv[0].first + vv[1].first + vv[2].first + vv[3].first) * 1.0 / 4.0,
  b = (vv[0].second + vv[1].second + vv[2].second + vv[3].second) * 1.0 / 4.0;
  for (long long i = -100; i <= 100; i++) {
    for (long long j = -100; j <= 100; j++) {
      if (fun(i, j) &&
          dis(a, b, i, j) <= dis(a, b, vv[0].first, vv[0].second)) {
        cout << "YES" << endl;
        return 0;
      }
    }
  }
  cout << "NO" << endl;
}
