#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, y, sq1[4][2], sq2[4][2], uppx = -101, lowx = 101, uppy = -101,
                                  lowy = 101, upx, upy, lox, loy;
  for (int i = 0; i < 4; i++) {
    cin >> x >> y;
    sq1[i][0] = x;
    sq1[i][1] = y;
    lox = lowx = min(lowx, x);
    upx = uppx = max(uppx, x);
    loy = lowy = min(lowy, y);
    upy = uppy = max(uppy, y);
  }
  for (int i = 0; i < 4; i++) {
    cin >> x >> y;
    sq2[i][0] = x;
    sq2[i][1] = y;
    if (x <= uppx && x >= lowx && y <= uppy && y >= lowy) {
      cout << "YES";
      return 0;
    }
  }
  int cox;
  uppy = -101, lowy = 101;
  for (int i = 0; i < 4; i++) {
    if (uppy < sq2[i][1]) {
      uppy = sq2[i][1];
      cox = sq2[i][0];
    }
    lowy = min(lowy, sq2[i][1]);
  }
  for (int i = 0; i < 4; i++) {
    x = sq1[i][0];
    y = sq1[i][1];
    if (x + y <= uppy + cox && x + y >= lowy + cox) {
      if (y - x <= uppy - cox && y - x >= lowy - cox) {
        cout << "YES";
        return 0;
      }
    }
  }
  int midy = (upy + loy) / 2;
  int midx = (upx + lox) / 2;
  if (midx + midy <= uppy + cox && midx + midy >= lowy + cox) {
    if (midy - midx <= uppy - cox && midy - midx >= lowy - cox) {
      cout << "YES";
      return 0;
    }
  }
  cout << "NO";
  return 0;
}
