#include <bits/stdc++.h>
int area(int x1, int y1, int x2, int y2, int x3, int y3) {
  int s = x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2);
  return s < 0 ? -s : s;
}
struct Square {
  int x[4], y[4];
  void read() {
    for (int i = 0; i < 4; i++) scanf("%d%d", x + i, y + i);
  }
  bool in(int a, int b) {
    int s1 = 0, s2 = 0;
    for (int i = 0; i < 4; i++) {
      s1 += area(x[0], y[0], x[i], y[i], x[(i + 1) % 4], y[(i + 1) % 4]);
      s2 += area(a, b, x[i], y[i], x[(i + 1) % 4], y[(i + 1) % 4]);
    }
    return s1 == s2;
  }
} S1, S2;
int main() {
  S1.read();
  S2.read();
  for (int x = -100; x <= 100; x++)
    for (int y = -100; y <= 100; y++)
      if (S1.in(x, y) && S2.in(x, y)) return puts("YES"), 0;
  puts("NO");
}
