#include <bits/stdc++.h>
using namespace std;
struct node {
  int x[5], y[5];
  int len;
  int sx, sy;
} a[3];
int vis[505][505];
void Init() {
  for (int i = 1; i <= 3; ++i)
    a[1].len = max(a[1].len, abs(a[1].x[i] - a[1].x[i + 1]));
  a[1].sx = a[1].sy = (1 << 30);
  for (int i = 1; i <= 4; ++i)
    a[1].sx = min(a[1].sx, a[1].x[i]), a[1].sy = min(a[1].sy, a[1].y[i]);
  a[2].len = abs(a[2].x[1] - a[2].x[2]);
  a[2].sx = (1 << 30);
  for (int i = 1; i <= 4; ++i)
    if (a[2].x[i] < a[2].sx) a[2].sx = a[2].x[i], a[2].sy = a[2].y[i];
}
void Get1() {
  for (int i = 0; i <= a[1].len; ++i)
    for (int j = 0; j <= a[1].len; ++j) vis[a[1].sx + i][a[1].sy + j]++;
}
void Get2() {
  for (int i = 0; i < a[2].len; ++i)
    for (int j = -i; j <= i; ++j) vis[a[2].sx + i][a[2].sy + j]++;
  for (int i = -a[2].len; i <= a[2].len; ++i)
    vis[a[2].sx + a[2].len][a[2].sy + i]++;
  for (int i = 0; i < a[2].len; ++i)
    for (int j = -i; j <= i; ++j)
      vis[a[2].sx + a[2].len * 2 - i][a[2].sy + j]++;
}
int main() {
  for (int i = 1; i <= 2; ++i) {
    for (int j = 1; j <= 4; ++j) cin >> a[i].x[j] >> a[i].y[j];
    for (int j = 1; j <= 4; ++j) a[i].x[j] += 105, a[i].y[j] += 105;
  }
  Init();
  Get1();
  Get2();
  for (int i = 0; i <= 300; ++i)
    for (int j = 0; j <= 300; ++j)
      if (vis[i][j] > 1) return cout << "YES", 0;
  return cout << "NO", 0;
}
