#include <bits/stdc++.h>
using namespace std;
bool inside_1(int x1, int y1, int x2, int y2, int x, int y) {
  return x >= min(x1, x2) && x <= max(x1, x2) && y >= min(y1, y2) &&
         y <= max(y1, y2);
}
int main() {
  int x[2][4], y[2][4];
  for (int i = 0; i < 2; i++) {
    for (int j = 0; j < 4; j++) {
      cin >> x[i][j] >> y[i][j];
    }
  }
  int x1, y1, x2, y2;
  x1 = x[0][0], x2 = x[0][0], y1 = y[0][0], y2 = y[0][0];
  for (int j = 1; j < 4; j++) {
    x1 = min(x1, x[0][j]), x2 = max(x2, x[0][j]);
    y1 = min(y1, y[0][j]), y2 = max(y2, y[0][j]);
  }
  bool ok = false;
  for (int j = 0; j < 4 && !ok; j++) {
    if (inside_1(x1, y1, x2, y2, x[1][j], y[1][j])) {
      ok = true;
    }
  }
  int max_x = *max_element(x[1], x[1] + 4);
  int min_x = *min_element(x[1], x[1] + 4);
  int max_y = *max_element(y[1], y[1] + 4);
  int min_y = *min_element(y[1], y[1] + 4);
  assert((max_x - min_x) % 2 == 0);
  int a = (max_x - min_x) / 2;
  int xc = (min_x + max_x) / 2, yc = (min_y + max_y) / 2;
  for (int j = 0; j < 4; j++) {
    x[0][j] -= xc;
    y[0][j] -= yc;
  }
  for (int j = 0; j < 4 && !ok; j++) {
    int X = x[0][j], Y = y[0][j];
    if (X + Y <= a && -X + Y <= a && X - Y <= a && -X - Y <= a) {
      ok = true;
    }
  }
  if (ok)
    cout << "YES" << endl;
  else {
    if (inside_1(x1, y1, x2, y2, xc, yc)) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
  return 0;
}
