#include <bits/stdc++.h>
using namespace std;
int x[4], y[4], lx, hx, ly, hy, cx, cy, r;
int lx2, hx2, ly2, hy2, cx2, cy2, r2;
bool in(int x, int y, int lx, int ly, int hx, int hy) {
  return lx <= x && x <= hx && ly <= y && y <= hy;
}
bool in2(int x, int y, int lx, int ly, int hx, int hy) {
  int cx = lx + hx;
  int cy = ly + hy;
  int dis = abs(x * 2 - cx) + abs(y * 2 - cy);
  return dis <= (cx - lx * 2);
}
int main() {
  for (int i = (0); i < (4); i++) scanf("%d %d", &x[i], &y[i]);
  lx = hx = x[0];
  ly = hy = y[0];
  for (int i = (1); i < (4); i++) {
    lx = min(lx, x[i]);
    hx = max(hx, x[i]);
    ly = min(ly, y[i]);
    hy = max(hy, y[i]);
  }
  cx = lx + hx;
  cy = ly + hy;
  r = hx - lx;
  for (int i = (0); i < (4); i++) scanf("%d %d", &x[i], &y[i]);
  lx2 = hx2 = x[0];
  ly2 = hy2 = y[0];
  for (int i = (1); i < (4); i++) {
    lx2 = min(lx2, x[i]);
    hx2 = max(hx2, x[i]);
    ly2 = min(ly2, y[i]);
    hy2 = max(hy2, y[i]);
  }
  cx2 = lx2 + hx2;
  cy2 = ly2 + hy2;
  r2 = hx2 - lx2;
  if (abs(cx - cx2) + abs(cy - cy2) <= r2 || in2(lx, ly, lx2, ly2, hx2, hy2) ||
      in2(lx, hy, lx2, ly2, hx2, hy2) || in2(hx, ly, lx2, ly2, hx2, hy2) ||
      in2(hx, hy, lx2, ly2, hx2, hy2) ||
      in(lx2, ly2 + hy2 >> 1, lx, ly, hx, hy) ||
      in(lx2 + hx2 >> 1, hy2, lx, ly, hx, hy) ||
      in(hx2, ly2 + hy2 >> 1, lx, ly, hx, hy) ||
      in(lx2 + hx2 >> 1, ly2, lx, ly, hx, hy)) {
    puts("YES");
  } else {
    puts("NO");
  }
}
