#include <bits/stdc++.h>
using namespace std;
int main() {
  int mxx = -100, mnx = 100, mxy = -100, mny = 100;
  for (int i = 1; i <= 4; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    mxx = max(mxx, x), mnx = min(mnx, x);
    mxy = max(mxy, y), mny = min(mny, y);
  }
  int mxx0 = -100, mnx0 = 100, mxy0 = -100, mny0 = 100;
  for (int i = 1; i <= 4; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    mxx0 = max(mxx0, x), mnx0 = min(mnx0, x);
    mxy0 = max(mxy0, y), mny0 = min(mny0, y);
  }
  int cx = (mxx0 + mnx0) / 2, cy = (mxy0 + mny0) / 2, clen = mxx0 - cx;
  for (int i = mnx; i <= mxx; i++)
    for (int j = mny; j <= mxy; j++)
      if (abs(i - cx) + abs(j - cy) <= clen) {
        printf("YES\n");
        return 0;
      }
  printf("NO\n");
  return 0;
}
