#include <bits/stdc++.h>
using namespace std;
int main() {
  cout << setprecision(10);
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int minx = INT_MAX, maxx = INT_MIN, miny = INT_MAX, maxy = INT_MIN;
  for (int i = 0; i < 4; i++) {
    int x, y;
    cin >> x >> y;
    minx = min(minx, x);
    maxx = max(maxx, x);
    miny = min(miny, y);
    maxy = max(maxy, y);
  }
  double a, b, c, d, e, f, g, h;
  cin >> a >> b >> c >> d >> e >> f >> g >> h;
  double cx, cy;
  if (a == e) {
    cx = (c + g) / 2;
    cy = (b + f) / 2;
  } else {
    cx = (a + e) / 2;
    cy = (d + h) / 2;
  }
  int diag = abs(a - cx) + abs(b - cy);
  for (int i = minx; i < maxx + 1; i++) {
    for (int j = miny; j < maxy + 1; j++) {
      if (abs(i - cx) + abs(j - cy) <= diag) {
        cout << "YES";
        return 0;
      }
    }
  }
  cout << "NO";
}
