#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const int N = 105;
struct pos {
  double x, y;
  inline pos() {}
  inline pos(double _x, double _y) {
    x = _x;
    y = _y;
  }
} a[4], b[4];
inline bool Inrange(double x, double l, double r) {
  if (l > r) swap(l, r);
  if (l <= x && x <= r) return true;
  return false;
}
bool init() {
  double X = -101, Y = -101;
  double XX = 101, YY = 101;
  double x, y;
  for (int i = 0; i < 4; i++) {
    X = max(X, a[i].x);
    Y = max(Y, a[i].y);
    XX = min(XX, a[i].x);
    YY = min(YY, a[i].y);
  }
  for (int i = 0; i < 4; i++) {
    int _i = (i + 1) % 4;
    if (b[i].x + b[i].y == b[_i].x + b[_i].y) {
      double C = b[i].x + b[i].y;
      for (int j = 0; j < 4; j++) {
        int _j = (j + 1) % 4;
        if (a[j].x == a[_j].x && Inrange(a[j].x, b[i].x, b[_i].x) == true) {
          if (Inrange(C - a[j].x, a[j].y, a[_j].y) == true) {
            printf("YES\n");
            return true;
          }
        } else if (Inrange(a[j].y, b[i].y, b[_i].y) == true) {
          if (Inrange(C - a[j].y, a[j].x, a[_j].x) == true) {
            printf("YES\n");
            return true;
          }
        }
      }
    } else {
      double C = b[i].y - b[i].x;
      for (int j = 0; j < 4; j++) {
        int _j = (j + 1) % 4;
        if (a[j].x == a[_j].x && Inrange(a[j].x, b[i].x, b[_i].x) == true) {
          if (Inrange(C + a[j].x, a[j].y, a[_j].y) == true) {
            printf("YES\n");
            return true;
          }
        } else if (Inrange(a[j].y, b[i].y, b[_i].y) == true) {
          if (Inrange(a[j].y - C, a[j].x, a[_j].x) == true) {
            printf("YES\n");
            return true;
          }
        }
      }
    }
    if (Inrange(b[i].x, XX, X) == true && Inrange(b[i].y, YY, Y) == true) {
      printf("YES\n");
      return true;
    }
  }
  return false;
}
int main(int argc, char** argv) {
  double x, y;
  for (int i = 0; i < 4; i++) {
    cin >> x >> y;
    a[i] = pos(x, y);
  }
  for (int i = 0; i < 4; i++) {
    cin >> x >> y;
    b[i] = pos(x, y);
  }
  if (init() == true) return 0;
  for (int i = 0; i < 4; i++) {
    x = a[i].x, y = a[i].y;
    a[i] = pos(x - y, x + y);
    x = b[i].x, y = b[i].y;
    b[i] = pos(x - y, x + y);
  }
  for (int i = 0; i < 4; i++) {
    swap(a[i], b[i]);
  }
  if (init() == true) return 0;
  printf("NO\n");
  return 0;
}
