#include <bits/stdc++.h>
using namespace std;
const int N = 1000 * 100 + 5;
bool is_Prime(long long a) {
  for (long long i = 2; i * i <= a; ++i)
    if (a % i == 0) return false;
  return true;
}
bool ss(pair<long long, long long> a, pair<long long, long long> b) {
  return (a.second < b.second);
}
long long fact(long long n) {
  vector<long long> v;
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      if (n / i == i)
        v.push_back(i);
      else {
        v.push_back(i);
        v.push_back(n / i);
      }
    }
  }
  return v.size();
}
long long C(long long n, long long r) {
  vector<vector<long long> > c(n + 1, vector<long long>(r + 1, 0));
  for (long long i = 0; i < n + 1; i++) {
    for (long long j = 0; j <= i && j <= r; j++)
      if (j == 0 || j == i)
        c[i][j] = 1;
      else
        c[i][j] = (c[i - 1][j - 1] + c[i - 1][j]) % 1000000007;
  }
  return c[n][r] % 1000000007;
}
bool is_pl(string s, int n) {
  for (long long i = 0; i < n / 2; i++) {
    if (s[i] != s[n - i - 1]) return false;
  }
  return true;
}
vector<pair<long long, long long> > s1(4), s2(4);
vector<long long> x, y, p1, p2;
bool chk1(long long a, long long b) {
  return (a >= x[0] && a <= x[1] && b >= y[0] && b <= y[1]);
}
bool chk2(long long a, long long b) {
  return (a + b - p2[0] >= 0 && a + b - p2[1] <= 0 && a - b + p1[1] >= 0 &&
          a - b + p1[0] <= 0);
}
void solve() {
  for (long long i = 0; i < 4; i++) cin >> s1[i].first >> s1[i].second;
  for (long long i = 0; i < 4; i++) cin >> s2[i].first >> s2[i].second;
  for (long long i = 0; i < 4; i++) {
    pair<long long, long long> cur = s1[i], nxt = s1[(i + 1) % 4];
    if (cur.first == nxt.first)
      x.push_back(cur.first);
    else
      y.push_back(cur.second);
  }
  sort(x.begin(), x.end());
  sort(y.begin(), y.end());
  for (long long i = 0; i < 4; i++) {
    pair<long long, long long> cur = s2[i], nxt = s2[(i + 1) % 4];
    if ((cur.second - nxt.second) / (cur.first - nxt.first) == 1)
      p1.push_back(cur.second - cur.first);
    else
      p2.push_back(cur.second + cur.first);
  }
  sort(p1.begin(), p1.end());
  sort(p2.begin(), p2.end());
  for (long long i = -101; i < 101; i++) {
    for (long long j = -101; j < 101; j++) {
      if (chk1(i, j) && chk2(i, j)) {
        cout << "YES\n";
        return;
      }
    }
  }
  cout << "NO\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  ;
  int T = 1;
  while (T--) {
    solve();
  }
  return 0;
}
