#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9;
const double eps = 1e-10;
const double pi = acos(-1.0);
inline int read() {
  int x = 0, f = 1;
  char ch;
  ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = 0;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = (x << 1) + (x << 3) + (ch & 15);
    ch = getchar();
  }
  if (f)
    return x;
  else
    return -x;
}
int Xn = inf, Xx = -inf, Yn = inf, Yx = -inf;
struct Point {
  int x, y;
} P[4], Q[4], p;
inline bool operator<(const Point &a, const Point &b) {
  return a.x < b.x || (a.x == b.x && a.y < b.y);
};
int Dis(const Point &a, const Point &b) {
  return abs(a.x - b.x) + abs(a.y - b.y);
}
int main() {
  for (int i = 0; i < 4; i++)
    P[i].x = read(), P[i].y = read(), Xx = max(Xx, P[i].x),
    Xn = min(Xn, P[i].x), Yx = max(Yx, P[i].y), Yn = min(Yn, P[i].y);
  for (int i = 0; i < 4; i++) Q[i].x = read(), Q[i].y = read();
  Point p = (Point){(Q[0].x + Q[2].x) / 2, (Q[0].y + Q[2].y) / 2};
  int dis = max(abs(Q[0].x - Q[2].x) / 2, abs(Q[0].y - Q[2].y) / 2);
  for (int x = Xn; x <= Xx; x++)
    for (int y = Yn; y <= Yx; y++)
      if (abs(x - p.x) + abs(y - p.y) <= dis) {
        printf("YES\n");
        return 0;
      }
  printf("NO\n");
  return 0;
}
