#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  double a[20] = {0};
  int i = 0;
  for (i = 0; i < 16; i++) cin >> a[i];
  double x1 = a[0], x2 = a[2], x3 = a[4], x4 = a[6];
  double y1 = a[1], y2 = a[3], y3 = a[5], y4 = a[7];
  double maxx = max(x1, (max(x2, max(x3, x4))));
  double minx = min(x1, (min(x2, min(x3, x4))));
  double maxy = max(y1, (max(y2, max(y3, y4))));
  double miny = min(y1, (min(y2, min(y3, y4))));
  double centre2x = (a[8] + a[12]) / 2.00;
  double centre2y = (a[9] + a[13]) / 2.00;
  if (minx <= centre2x && centre2x <= maxx && miny <= centre2y &&
      centre2y <= maxy) {
    cout << "YES" << '\n';
    return 0;
  }
  if (minx <= a[8] && a[8] <= maxx && miny <= a[9] && a[9] <= maxy) {
    cout << "YES" << '\n';
    return 0;
  }
  if (minx <= a[10] && a[10] <= maxx && miny <= a[11] && a[11] <= maxy) {
    cout << "YES" << '\n';
    return 0;
  }
  if (minx <= a[12] && a[12] <= maxx && miny <= a[13] && a[13] <= maxy) {
    cout << "YES" << '\n';
    return 0;
  }
  if (minx <= a[14] && a[14] <= maxx && miny <= a[15] && a[15] <= maxy) {
    cout << "YES" << '\n';
    return 0;
  }
  for (i = 0; i < 16; i += 2) {
    double x = (a[i] + a[i + 1]) / sqrt(2);
    double y = (a[i] - a[i + 1]) / sqrt(2);
    a[i] = x;
    a[i + 1] = y;
  }
  x1 = a[0 + 8], x2 = a[2 + 8], x3 = a[4 + 8], x4 = a[6 + 8];
  y1 = a[1 + 8], y2 = a[3 + 8], y3 = a[5 + 8], y4 = a[7 + 8];
  maxx = max(x1, (max(x2, max(x3, x4))));
  minx = min(x1, (min(x2, min(x3, x4))));
  maxy = max(y1, (max(y2, max(y3, y4))));
  miny = min(y1, (min(y2, min(y3, y4))));
  centre2x = (a[8 - 8] + a[12 - 8]) / 2.00;
  centre2y = (a[9 - 8] + a[13 - 8]) / 2.00;
  if (minx <= centre2x && centre2x <= maxx && miny <= centre2y &&
      centre2y <= maxy) {
    cout << "YES" << '\n';
    return 0;
  }
  if (minx <= a[8 - 8] && a[8 - 8] <= maxx && miny <= a[9 - 8] &&
      a[9 - 8] <= maxy) {
    cout << "YES" << '\n';
    return 0;
  }
  if (minx <= a[10 - 8] && a[10 - 8] <= maxx && miny <= a[11 - 8] &&
      a[11 - 8] <= maxy) {
    cout << "YES" << '\n';
    return 0;
  }
  if (minx <= a[12 - 8] && a[12 - 8] <= maxx && miny <= a[13 - 8] &&
      a[13 - 8] <= maxy) {
    cout << "YES" << '\n';
    return 0;
  }
  if (minx <= a[14 - 8] && a[14 - 8] <= maxx && miny <= a[15 - 8] &&
      a[15 - 8] <= maxy) {
    cout << "YES" << '\n';
    return 0;
  }
  cout << "NO" << '\n';
  return 0;
}
