#include <bits/stdc++.h>
using namespace std;
double root2 = sqrt(2.0);
pair<double, double> rotate(int xc, int yc, int x, int y) {
  int x1 = x - xc, y1 = y - yc;
  double x2 = (x1 - y1) / root2, y2 = (x1 + y1) / root2;
  return make_pair(x2 + xc, y2 + yc);
}
double EPS = 0.0000000001;
int dcmp(double a, double b) { return fabs(a - b) <= EPS ? 0 : a > b ? 1 : -1; }
int main() {
  int n = 4;
  vector<pair<int, int> > sq1(n), sq2(n);
  for (int i = 0; i < (n); i++) {
    scanf("%d %d", &sq1[i].first, &sq1[i].second);
  }
  sort(sq1.begin(), sq1.end());
  for (int i = 0; i < (n); i++) {
    scanf("%d %d", &sq2[i].first, &sq2[i].second);
  }
  sort(sq2.begin(), sq2.end());
  pair<double, double> rotated =
      rotate(sq2[0].first, sq2[0].second, sq2[3].first, sq2[3].second);
  for (int i = -100; i < (101); i++) {
    for (int j = -100; j < (101); j++) {
      int checker = 0;
      if ((i >= sq1[0].first && i <= sq1[3].first) &&
          (j >= sq1[0].second && j <= sq1[3].second)) {
        checker++;
      }
      pair<double, double> r = rotate(sq2[0].first, sq2[0].second, i, j);
      if (dcmp(r.first, sq2[0].first) >= 0 &&
          dcmp(r.first, rotated.first) <= 0 &&
          dcmp(r.second, sq2[0].second) >= 0 &&
          dcmp(r.second, rotated.second) <= 0) {
        checker++;
      }
      if (checker == 2) {
        printf("%s", "YES\n");
        return 0;
      }
    }
  }
  printf("%s", "NO\n");
  return 0;
}
