#include <bits/stdc++.h>
using namespace std;
void qmax(int &x, int y) {
  if (x < y) x = y;
}
void qmin(int &x, int y) {
  if (x > y) x = y;
}
inline int read() {
  char s;
  int k = 0, base = 1;
  while ((s = getchar()) != '-' && s != EOF && !(isdigit(s)))
    ;
  if (s == EOF) exit(0);
  if (s == '-') base = -1, s = getchar();
  while (isdigit(s)) k = k * 10 + (s ^ '0'), s = getchar();
  return k * base;
}
inline void write(int x) {
  static char cnt, num[15];
  cnt = 0;
  if (!x) {
    putchar('0');
    return;
  }
  for (; x; x /= 10) num[++cnt] = x % 10;
  for (; cnt; putchar(num[cnt--] + 48))
    ;
}
const int n = 4;
struct node {
  int x, y;
} a[5];
int f[300][300], xmin, ymin, xmax, ymax;
int main() {
  ymax = xmax = 0;
  ymin = xmin = 2333;
  for (int i = 1; i <= 4; i++)
    a[i].x = read() + 100, a[i].y = read() + 100, qmin(xmin, a[i].x),
    qmax(xmax, a[i].x), qmin(ymin, a[i].y), qmax(ymax, a[i].y);
  for (int i = xmin + 1; i <= xmax; i++)
    for (int j = ymin + 1; j <= ymax; j++) f[i][j] = 1;
  ymax = xmax = 0;
  ymin = xmin = 2333;
  for (int i = 1; i <= 4; i++)
    a[i].x = read() + 100, a[i].y = read() + 100, qmin(xmin, a[i].x),
    qmax(xmax, a[i].x), qmin(ymin, a[i].y), qmax(ymax, a[i].y);
  int i, l, r, s = xmax - xmin + 1;
  if (s % 2 == 1) s++;
  for (i = xmin, l = (ymin + ymax) / 2, r = l + 1; r - l + 1 <= s;
       i++, l--, r++) {
    for (int j = l; j <= r; j++)
      if (f[i][j]) {
        printf("YES");
        return 0;
      }
  }
  l++;
  r--;
  for (; i <= xmax + 1; i++, l++, r--) {
    for (int j = l; j <= r; j++)
      if (f[i][j]) {
        printf("YES");
        return 0;
      }
  }
  printf("NO");
  return 0;
}
