#include <bits/stdc++.h>
using namespace std;
const int maxn = 100010;
int a[10];
int b[10];
int c[250][250];
int main() {
  int amin = 1000, amax = -1000;
  int bmin = 1000, bmax = -1000;
  for (int i = 0; i < 4; i++) {
    scanf("%d%d", &a[i], &b[i]);
    a[i] += 100;
    b[i] += 100;
    amin = min(amin, a[i]);
    amax = max(a[i], amax);
    bmin = min(bmin, b[i]);
    bmax = max(bmax, b[i]);
  }
  for (int i = amin; i <= amax; i++) {
    for (int j = bmin; j <= bmax; j++) {
      c[i][j] = 1;
    }
  }
  printf("\n");
  amin = 1000, amax = -1000;
  bmin = 1000, bmax = -1000;
  memset(a, 0, sizeof(a));
  memset(b, 0, sizeof(b));
  for (int i = 4; i < 8; i++) {
    scanf("%d%d", &a[i], &b[i]);
    a[i] += 100;
    b[i] += 100;
    amin = min(amin, a[i]);
    amax = max(a[i], amax);
    bmin = min(bmin, b[i]);
    bmax = max(bmax, b[i]);
  }
  int ay = (bmin + bmax) / 2;
  int ax = (amin + amax) / 2;
  int f1 = 0;
  for (int i = amin; i <= ax; i++) {
    for (int j = ay; j >= ay - i + amin; j--) {
      if (c[i][j]) {
        f1 = 1;
        break;
      }
    }
  }
  for (int i = ax + 1; i <= amax; i++) {
    for (int j = ay; j >= bmin + i - ax; j--) {
      if (c[i][j]) {
        f1 = 1;
        break;
      }
    }
  }
  for (int i = amin; i <= ax; i++) {
    for (int j = ay + 1; j <= ay + (i - amin); j++) {
      if (c[i][j]) {
        f1 = 1;
        break;
      }
    }
  }
  for (int i = ax + 1; i <= amax; i++) {
    for (int j = ay + 1; j <= bmax - (i - ax); j++) {
      if (c[i][j]) {
        f1 = 1;
        break;
      }
    }
  }
  if (f1)
    printf("YES\n");
  else
    printf("NO\n");
}
