#include <bits/stdc++.h>
using namespace std;
struct S {
  int a, b;
  S() {}
  S(int _a, int _b) {
    a = _a;
    b = _b;
  }
  const bool operator<(const S &o) const { return a < o.a; }
};
priority_queue<int, vector<int>, greater<int>> mpq;
inline void showAll(vector<int> &v, int NL_or_space) {
  for (int &here : v) {
    printf("%d", here);
    printf("%c", (NL_or_space) ? '\n' : ' ');
  }
}
const int SIZE = 209;
const int ADJ = 100;
int ax[5], bx[5], ay[5], by[5];
int grid[SIZE][SIZE];
int main() {
  for (int i = 1; i <= 4; i++) {
    scanf("%d %d", &ax[i], &ay[i]);
  }
  for (int i = 1; i <= 4; i++) {
    scanf("%d %d", &bx[i], &by[i]);
  }
  int lbax = SIZE, lbay = SIZE, ruax = -SIZE, ruay = -SIZE;
  for (int i = 1; i <= 4; i++) {
    lbax = min(lbax, ax[i]);
    lbay = min(lbay, ay[i]);
    ruax = max(ruax, ax[i]);
    ruay = max(ruay, ay[i]);
  }
  for (int i = lbax; i <= ruax; i++) {
    for (int j = lbay; j <= ruay; j++) {
      grid[i + ADJ][j + ADJ] = 1;
    }
  }
  int minbx = SIZE, maxbx = -SIZE;
  for (int i = 1; i <= 4; i++) {
    minbx = min(minbx, bx[i]);
    maxbx = max(maxbx, bx[i]);
  }
  int yy;
  for (int i = 1; i <= 4; i++)
    if (bx[i] == minbx) yy = by[i];
  int dist = (maxbx - minbx) / 2;
  int ans = -1;
  for (int i = 0; i <= dist; i++) {
    for (int j = 0; j <= i; j++) {
      if (grid[minbx + i + ADJ][yy + j + ADJ] ||
          grid[minbx + i + ADJ][yy - j + ADJ])
        ans = 1;
      if (grid[maxbx - i + ADJ][yy + j + ADJ] ||
          grid[maxbx - i + ADJ][yy - j + ADJ])
        ans = 1;
    }
  }
  printf("%s\n", (ans == 1) ? "YES" : "NO");
  return 0;
}
