#include <bits/stdc++.h>
using namespace std;
int lx, ly, rx, ry;
int sum[209][209];
void init() {
  int x, y;
  lx = 209, ly = 209, rx = -209, ry = -209;
  for (int i = 1; i <= 4; i++) {
    cin >> x >> y;
    lx = min(lx, x + 100);
    ly = min(ly, y + 100);
    rx = max(rx, x + 100);
    ry = max(ry, y + 100);
  }
}
int main() {
  init();
  for (int i = lx; i <= rx; i++) {
    for (int j = ly; j <= ry; j++) {
      sum[i][j] = 1;
    }
  }
  init();
  int mx = (rx + lx) / 2;
  int my = (ry + ly) / 2;
  int len = (rx - lx) / 2;
  for (int i = lx; i <= rx; i++) {
    for (int j = ly; j <= ry; j++) {
      if (abs(i - mx) + abs(j - my) <= len) {
        sum[i][j]++;
      }
    }
  }
  for (int i = 0; i <= 200; i++) {
    for (int j = 0; j <= 200; j++) {
      if (sum[i][j] > 1) {
        cout << "YES";
        return 0;
      }
    }
  }
  cout << "NO";
  return 0;
}
