#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma warning(disable : 4996)
#pragma comment(linker, "/STACK:336777216")
using namespace std;
int dx[4] = {1, -1, 0, 0};
int dy[4] = {0, 0, 1, -1};
int ddx[8] = {0, 0, 1, 1, 1, -1, -1, -1}, ddy[8] = {1, -1, 1, 0, -1, 1, 0, -1};
long long POW(long long a, long long b, long long MMM) {
  long long ret = 1;
  for (; b; b >>= 1, a = (a * a) % MMM)
    if (b & 1) ret = (ret * a) % MMM;
  return ret;
}
long long GCD(long long a, long long b) { return b ? GCD(b, a % b) : a; }
long long LCM(long long a, long long b) {
  if (a == 0 || b == 0) return a + b;
  return a * (b / GCD(a, b));
}
long long INV(long long a, long long m) {
  long long m0 = m, y = 0, x = 1;
  if (m == 1) return 0;
  while (a > 1) {
    long long q = a / m;
    long long t = m;
    m = a % m, a = t;
    t = y;
    y = x - q * y;
    x = t;
  }
  if (x < 0) x += m0;
  return x;
}
pair<long long, long long> EXGCD(long long a, long long b) {
  if (b == 0) return {1, 0};
  auto t = EXGCD(b, a % b);
  return {t.second, t.first - t.second * (a / b)};
}
bool OOB(long long x, long long y, long long N, long long M) {
  return 0 > x || x >= N || 0 > y || y >= M;
}
pair<int, int> S[4];
pair<int, int> D[4];
int board[205][205];
int sign(int x) {
  if (x > 0) return 1;
  return -1;
}
int main(void) {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int mnX, mnY, mxX, mxY;
  mnX = mnY = 500;
  mxX = mxY = -500;
  for (int i = 0; i < 4; i++) {
    cin >> S[i].first >> S[i].second;
    mnX = min(mnX, S[i].first);
    mxX = max(mxX, S[i].first);
    mnY = min(mnY, S[i].second);
    mxY = max(mxY, S[i].second);
  }
  for (int x = mnX; x <= mxX; x++) {
    for (int y = mnY; y <= mxY; y++) board[x + 100][y + 100] = 1;
  }
  pair<int, int> lower = {1, 500};
  for (int j = 0; j < 4; j++) {
    cin >> D[j].first >> D[j].second;
    if (lower.second > D[j].second) lower = D[j];
  }
  int k = abs(D[0].first - D[1].first);
  for (int i = 0; i <= k; i++) {
    for (int j = lower.first - i; j <= lower.first + i; j++) {
      if (board[100 + j][100 + lower.second + i] == 1) {
        cout << "YES";
        return 0;
      }
    }
  }
  for (int i = 0; i <= k; i++) {
    for (int j = lower.first - i; j <= lower.first + i; j++) {
      if (board[100 + j][100 + lower.second + 2 * k - i] == 1) {
        cout << "YES";
        return 0;
      }
    }
  }
  cout << "NO";
  return 0;
}
