#include <bits/stdc++.h>
FILE *in = stdin;
FILE *out = stdout;
int color[204][204];
int x[4], y[4];
int xx[4], yy[4];
int main() {
  int i, j, k;
  for (i = 0; i < 4; i++) {
    fscanf(in, "%d %d", &xx[i], &yy[i]);
    xx[i] += 100;
    yy[i] += 100;
  }
  std::sort(xx, xx + 4);
  std::sort(yy, yy + 4);
  for (i = xx[0]; i < xx[3]; i++) {
    for (j = yy[0]; j < yy[3]; j++) {
      color[i][j]++;
    }
  }
  for (i = 0; i < 4; i++) {
    fscanf(in, "%d %d", &x[i], &y[i]);
    x[i] += 100;
    y[i] += 100;
    if (x[i] == xx[0] || x[i] == xx[3]) {
      if (yy[0] <= y[i] && y[i] <= yy[3]) {
        fprintf(out, "YES");
        return 0;
      }
    }
    if (y[i] == yy[0] || y[i] == yy[3]) {
      if (xx[0] <= x[i] && x[i] <= xx[3]) {
        fprintf(out, "YES");
        return 0;
      }
    }
  }
  std::sort(x, x + 4);
  std::sort(y, y + 4);
  for (i = x[0]; i < (x[0] + x[3]) / 2; i++) {
    for (j = y[1] + (x[0] - i - 1); j <= y[1] + (i - x[0]); j++) {
      color[i][j]++;
    }
    if (yy[0] == y[1] + (x[0] - i) || yy[3] == y[1] - (x[0] - i) ||
        yy[0] == y[1] - (x[0] - i) || yy[3] == y[1] + (x[0] - i)) {
      if (xx[0] == i || xx[3] == i) {
        fprintf(out, "YES");
        return 0;
      }
    }
  }
  for (i = (x[0] + x[3]) / 2; i < x[3]; i++) {
    for (j = y[1] + (i - x[3]); j < y[1] + (x[3] - i); j++) {
      color[i][j]++;
    }
    if (yy[0] == y[1] + (i - x[3]) + 1 || yy[3] == y[1] + (x[3] - i) - 1 ||
        yy[3] == y[1] + (i - x[3]) + 1 || yy[0] == y[1] + (x[3] - i) - 1) {
      if (xx[0] == i || xx[3] == i) {
        fprintf(out, "YES");
        return 0;
      }
    }
  }
  for (i = 0; i <= 200; i++) {
    for (j = 0; j <= 200; j++) {
      if (color[i][j] == 2) {
        fprintf(out, "YES");
        return 0;
      }
    }
  }
  fprintf(out, "NO");
  return 0;
}
