#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int s[4] = {};
  int sd[4] = {};
  fill_n(sd, 4, numeric_limits<int>::min());
  for (int idx = 0; idx < 4; ++idx) {
    int x, y;
    cin >> x >> y;
    if (idx == 0) {
      s[0] = x;
      s[1] = y;
      s[2] = x;
      s[3] = y;
      continue;
    }
    s[0] = min(s[0], x);
    s[1] = min(s[1], y);
    s[2] = max(s[2], x);
    s[3] = max(s[3], y);
  }
  for (int idx = 0; idx < 4; ++idx) {
    int x, y;
    cin >> x >> y;
    if (x > sd[0]) {
      sd[0] = x;
      sd[1] = y;
    }
    if (y > sd[3]) {
      sd[2] = x;
      sd[3] = y;
    }
  }
  int topY = sd[3] - 2 * (sd[3] - sd[1]);
  for (int y = topY; y <= sd[3]; ++y) {
    int offset = min(y - topY, sd[3] - y);
    for (int x = sd[2] - offset; x <= sd[2] + offset; ++x) {
      if (x >= s[0] && x <= s[2] && y >= s[1] && y <= s[3]) {
        cout << "YES";
        return 0;
      }
    }
  }
  cout << "NO";
}
