#include <bits/stdc++.h>
using namespace std;
int X1[4], Y1[4], X2[4], Y2[4], l, r, u, d, cx, cy;
int in(int x, int y) { return l <= x && x <= r && d <= y && y <= u; }
int main() {
  scanf("%d%d%d%d%d%d%d%d", X1, Y1, X1 + 1, Y1 + 1, X1 + 2, Y1 + 2, X1 + 3,
        Y1 + 3);
  scanf("%d%d%d%d%d%d%d%d", X2, Y2, X2 + 1, Y2 + 1, X2 + 2, Y2 + 2, X2 + 3,
        Y2 + 3);
  for (int i = 0; i < 4; ++i) X1[i] *= 2, X2[i] *= 2, Y1[i] *= 2, Y2[i] *= 2;
  l = min(X1[0], X1[2]), r = max(X1[0], X1[2]), u = max(Y1[0], Y1[2]),
  d = min(Y1[0], Y1[2]), cx = (X2[0] + X2[2]) / 2, cy = (Y2[0] + Y2[2]) / 2;
  if (in(X2[0], Y2[0]) || in(X2[1], Y2[1]) || in(X2[2], Y2[2]) ||
      in(X2[3], Y2[3])) {
    printf("YES\n");
    return 0;
  }
  if (in(cx, cy))
    printf("YES\n");
  else if (min(abs(l - cx), abs(r - cx)) + min(abs(u - cy), abs(d - cy)) <=
           abs(X2[0] - cx) + abs(Y2[0] - cy))
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
