#include <bits/stdc++.h>
using namespace std;
int mark[1000 + 5][1000 + 5];
int main() {
  memset(mark, 0, sizeof(mark));
  int aminx = 1000 + 5, amaxx = -1 * 1000 + 5, aminy = 1000 + 5,
      amaxy = -1 * 1000 + 5, bminx = 1000 + 5, bmaxx = -1 * 1000 + 5,
      bminy = 1000 + 5, bmaxy = -1 * 1000 + 5;
  for (int i = 1; i <= 8; i++) {
    int x;
    scanf("%d", &x);
    if (i % 2) {
      aminx = min(aminx, x);
      amaxx = max(amaxx, x);
    } else {
      aminy = min(aminy, x);
      amaxy = max(amaxy, x);
    }
  }
  for (int i = 1; i <= 8; i++) {
    int x;
    scanf("%d", &x);
    if (i % 2) {
      bminx = min(bminx, x);
      bmaxx = max(bmaxx, x);
    } else {
      bminy = min(bminy, x);
      bmaxy = max(bmaxy, x);
    }
  }
  for (int i = aminx; i <= amaxx; i++) {
    for (int j = aminy; j <= amaxy; j++) {
      mark[i + 200][j + 200] = 1;
    }
  }
  int flag = 0;
  for (int i = bminx, j = 0; i <= (bminx + bmaxx) / 2; i++, j++) {
    for (int k = (bminy + bmaxy) / 2 - j; k <= (bminy + bmaxy) / 2 + j; k++) {
      if (mark[i + 200][k + 200] == 1) flag = 1;
    }
    if ((bminy + bmaxy) / 2 + j == bmaxy) break;
  }
  for (int i = bmaxx, j = 0; i >= (bminx + bmaxx) / 2; i--, j++) {
    for (int k = (bminy + bmaxy) / 2 - j; k <= (bminy + bmaxy) / 2 + j; k++) {
      if (mark[i + 200][k + 200] == 1) flag = 1;
    }
    if ((bminy + bmaxy) / 2 + j == bmaxy) break;
  }
  if (flag)
    printf("YES");
  else
    printf("NO");
  return 0;
}
