#include <bits/stdc++.h>
using namespace std;
struct point {
  int x, y;
  int det(point p) { return x * p.y - y * p.x; }
};
point a[10], b[10];
int GetCross(point p1, point p2, point p) {
  return (p2.x - p1.x) * (p.y - p1.y) - (p.x - p1.x) * (p2.y - p1.y);
}
bool check(point p) {
  return GetCross(b[1], b[2], p) * GetCross(b[3], b[4], p) >= 0 &&
         GetCross(b[2], b[3], p) * GetCross(b[4], b[1], p) >= 0;
}
int main() {
  for (int i = 1; i <= 4; i++) {
    scanf("%d%d", &a[i].x, &a[i].y);
  }
  for (int i = 1; i <= 4; i++) {
    scanf("%d%d", &b[i].x, &b[i].y);
  }
  int mix = min(min(min(a[1].x, a[2].x), a[3].x), a[4].x);
  int mxx = max(max(max(a[1].x, a[2].x), a[3].x), a[4].x);
  int miy = min(min(min(a[1].y, a[2].y), a[3].y), a[4].y);
  int mxy = max(max(max(a[1].y, a[2].y), a[3].y), a[4].y);
  for (int i = mix; i <= mxx; i++) {
    for (int j = miy; j <= mxy; j++) {
      point pi;
      pi.x = i;
      pi.y = j;
      if (check(pi)) {
        printf("YES\n");
        return 0;
      }
    }
  }
  printf("NO\n");
  return 0;
}
