#include <bits/stdc++.h>
using namespace std;
int a[5][2], b[5][2], sx, sy, tx, ty, i, j, l, r;
bool am[220][220], bm[220][220], faq;
int main() {
  for (i = 1; i <= 4; i++) {
    scanf("%d%d", &a[i][0], &a[i][1]);
    a[i][0] += 100, a[i][1] += 100;
    if (i == 1) sx = a[1][0], sy = a[1][1], tx = a[1][0], ty = a[1][1];
    if ((a[i][0] < sx && a[i][1] <= sy) || (a[i][0] <= sx && a[i][1] < sy))
      sx = a[i][0], sy = a[i][1];
    if ((a[i][0] > tx && a[i][1] >= ty) || (a[i][0] >= tx && a[i][1] > ty))
      tx = a[i][0], ty = a[i][1];
  }
  for (i = sx; i <= tx; i++)
    for (j = sy; j <= ty; j++) am[i][j] = 1;
  for (i = 1; i <= 4; i++) {
    scanf("%d%d", &b[i][0], &b[i][1]);
    b[i][0] += 100, b[i][1] += 100;
    if (i == 1) sx = b[1][0], sy = b[1][1], tx = b[1][0], ty = b[1][1];
    if (b[i][0] < sx) sx = b[i][0], sy = b[i][1];
    if (b[i][0] > tx) tx = b[i][0], ty = b[i][1];
  }
  for (i = 1, l = sx, r = tx; l <= r; i++, l++, r--)
    for (j = 1; j <= i; j++)
      bm[l][sy + j - 1] = bm[l][sy - j + 1] = bm[r][sy + j - 1] =
          bm[r][sy - j + 1] = 1;
  for (i = 0; i <= 200; i++)
    for (j = 0; j <= 200; j++)
      if (am[i][j] && bm[i][j]) faq = 1;
  if (faq)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
