#include <bits/stdc++.h>
using namespace std;
int main() {
  int x1[4], y1[4], x2[4], y2[4];
  int minx = 330, miny = 330, maxx = -320, maxy = -320;
  for (int i = 0; i < 4; i++) {
    cin >> x1[i] >> y1[i];
    minx = min(minx, x1[i]);
    miny = min(miny, y1[i]);
    maxx = max(maxx, x1[i]);
    maxy = max(maxy, y1[i]);
  }
  for (int i = 0; i < 4; i++) {
    cin >> x2[i] >> y2[i];
  }
  bool fked = 0;
  for (int x = -300; x <= 300; x++) {
    for (int y = -300; y <= 300; y++) {
      if (x <= maxx && x >= minx) {
        if (y <= maxy && y >= miny) {
          int ix = x + y, iy = x - y;
          int imaxx = -2332, imaxy = -2332, iminx = 2332, iminy = 2332;
          for (int i = 0; i < 4; i++) {
            imaxx = max(imaxx, x2[i] + y2[i]);
            imaxy = max(imaxy, x2[i] - y2[i]);
            iminx = min(iminx, x2[i] + y2[i]);
            iminy = min(iminy, x2[i] - y2[i]);
          }
          if (ix <= imaxx && ix >= iminx) {
            if (iy <= imaxy && iy >= iminy) {
              fked = 1;
            }
          }
        }
      }
    }
  }
  if (fked) {
    cout << "YES";
  } else {
    cout << "NO";
  }
  return 0;
}
