#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
const int N = 1e6 + 10;
const int N2 = 1e5 + 10;
const int off = 1e3;
const int inf = 1e9 + 10ll;
const int mod = 1e9 + 7;
const double eps = 1e-7;
mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());
using namespace std;
pair<int, int> a1[4];
int l1 = inf, r1 = -inf, u1 = -inf, d1 = inf;
int l2 = inf, r2 = -inf, u2 = -inf, d2 = inf;
pair<int, int> a2[4];
bool checkin1(int first, int second) {
  return first >= l1 && first <= r1 && second >= d1 && second <= u1;
}
bool checkin2(int first, int second) {
  if (!(first >= l2 && first <= r2 && second >= d2 && second <= u2))
    return false;
  double m1 = (double)(l2 + r2) / 2.0;
  double m2 = (double)(d2 + u2) / 2.0;
  double dlt1 = abs((double)first - m1);
  double dlt2 = abs((double)second - m2);
  return (double)first >= ((double)l2 + dlt2) &&
         (double)first <= ((double)r2 - dlt2) &&
         (double)second >= ((double)d2 + dlt1) &&
         (double)second <= ((double)u2 - dlt1);
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  for (int i = 0; i < 4; ++i) {
    cin >> a1[i].first >> a1[i].second;
    l1 = min(l1, a1[i].first);
    r1 = max(r1, a1[i].first);
    u1 = max(u1, a1[i].second);
    d1 = min(d1, a1[i].second);
  }
  for (int i = 0; i < 4; ++i) {
    cin >> a2[i].first >> a2[i].second;
    l2 = min(l2, a2[i].first);
    r2 = max(r2, a2[i].first);
    u2 = max(u2, a2[i].second);
    d2 = min(d2, a2[i].second);
  }
  bool ok = false;
  for (int i = 0; i < 4; ++i)
    ok |= checkin1(a2[i].first, a2[i].second) |
          checkin2(a1[i].first, a1[i].second);
  for (int i = l2; i <= r2; ++i) ok |= checkin1(i, (u2 + d2) / 2);
  if (ok)
    cout << "YES"
         << "\n";
  else
    cout << "NO"
         << "\n";
}
