#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
struct P {
  int x, y;
  void read() { scanf("%d%d", &x, &y); }
};
int det(int a1, int a2, int a3, int a4) { return a1 * a4 - a2 * a3; }
int area(P a, P b, P c) {
  int s = det(b.x, b.y, c.x, c.y) - det(a.x, a.y, c.x, c.y) +
          det(a.x, a.y, b.x, b.y);
  return abs(s);
}
struct Sq {
  P p[4];
  int S;
  void read() {
    for (int i = 0; i < 4; i++) p[i].read();
    S = 2 * area(p[0], p[1], p[2]);
  }
  bool in(P q) {
    int t = 0;
    for (int i = 0; i < 4; i++) {
      t += area(p[i], p[(i + 1) % 4], q);
    }
    return t == S;
  }
} s1, s2;
int main() {
  s1.read();
  s2.read();
  P p;
  for (int x = -100; x <= 100; x++) {
    for (int y = -100; y <= 100; y++) {
      p.x = x, p.y = y;
      if (s1.in(p) && s2.in(p)) {
        puts("YES");
        return 0;
      }
    }
  }
  puts("NO");
  return 0;
}
