#include <bits/stdc++.h>
using namespace std;
int ax[4], ay[4], bx[4], by[4];
bool sq[300][300] = {0};
int main() {
  int i, j;
  for (i = 0; i < 4; i++) scanf("%d%d", ax + i, ay + i);
  for (i = 0; i < 4; i++) scanf("%d%d", bx + i, by + i);
  sort(ax, ax + 4);
  sort(ay, ay + 4);
  sort(bx, bx + 4);
  sort(by, by + 4);
  ax[1] ^= ax[2];
  ax[2] ^= ax[1];
  ax[1] ^= ax[2];
  bx[0] ^= bx[1];
  bx[1] ^= bx[0];
  bx[0] ^= bx[1];
  bx[2] ^= bx[3];
  bx[3] ^= bx[2];
  bx[2] ^= bx[3];
  for (i = 150 + ax[0]; i <= 150 + ax[1]; i++) {
    for (j = 150 + ay[0]; j <= 150 + ay[2]; j++) sq[i][j] = 1;
  }
  for (i = 150 + bx[1], j = 0; i <= 150 + bx[0]; i++, j++) {
    for (int k = 150 + by[1]; k <= 150 + by[1] + j; k++) {
      if (sq[i][k]) {
        printf("YES");
        return 0;
      }
      sq[i][k] = 1;
    }
    if (j) {
      for (int k = 149 + by[1]; k >= 150 + by[1] - j; k--) {
        if (sq[i][k]) {
          printf("YES");
          return 0;
        }
        sq[i][k] = 1;
      }
    }
  }
  for (i = 150 + bx[2], j = 0; i > 150 + bx[0]; i--, j++) {
    for (int k = 150 + by[1]; k <= 150 + by[1] + j; k++) {
      if (sq[i][k]) {
        printf("YES");
        return 0;
      }
      sq[i][k] = 1;
    }
    if (j) {
      for (int k = 149 + by[1]; k >= 150 + by[1] - j; k--) {
        if (sq[i][k]) {
          printf("YES");
          return 0;
        }
        sq[i][k] = 1;
      }
    }
  }
  printf("NO");
  return 0;
}
