#include <bits/stdc++.h>
using namespace std;
bool check(int m, int n, int o, int p, int q, int r, int u, int v) {
  for (int x = -100; x <= 100; x++) {
    for (int y = -100; y <= 100; y++) {
      if ((m <= x and x <= n) and (o <= y and y <= p) and
          (q <= x + y and x + y <= r) and (u <= x - y and x - y <= v)) {
        return true;
      }
    }
  }
  return false;
}
int main() {
  int m = 10000, n = -10000, o = 10000, p = -10000, q = 10000, r = -10000,
      u = 10000, v = -10000;
  for (int i = 0; i < 4; i++) {
    int x, y;
    cin >> x >> y;
    m = min(m, x);
    n = max(n, x);
    o = min(o, y);
    p = max(p, y);
  }
  for (int i = 0; i < 4; i++) {
    int x, y;
    cin >> x >> y;
    q = min(q, x + y);
    r = max(r, x + y);
    u = min(u, x - y);
    v = max(v, x - y);
  }
  bool isit = check(m, n, o, p, q, r, u, v);
  if (isit) {
    cout << "YES"
         << "\n";
  } else {
    cout << "NO"
         << "\n";
  }
  return 0;
}
