#include <bits/stdc++.h>
const int Inf = 2e9;
long long LINF = (long long)4e18;
using namespace std;
long long mod = 1e9 + 7;
struct point {
  int x, y;
};
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  vector<point> a(4), b(4);
  int x1, x2, y1, y2;
  x1 = 2e9;
  y1 = 2e9;
  y2 = -2e9;
  x2 = -2e9;
  for (int i = 0; i < 4; i++) {
    cin >> a[i].x >> a[i].y;
    x1 = min(x1, a[i].x);
    y1 = min(y1, a[i].y);
    x2 = max(x2, a[i].x);
    y2 = max(y2, a[i].y);
  }
  for (int i = 0; i < 4; i++) {
    cin >> b[i].x >> b[i].y;
    if (b[i].x >= x1 && b[i].x <= x2) {
      if (b[i].y >= y1 && b[i].y <= y2) {
        cout << "YES";
        return 0;
      }
    }
  }
  int midx, midy;
  midx = (b[0].x + b[2].x) / 2;
  midy = (b[1].y + b[3].y) / 2;
  if (midx >= x1 && midx <= x2) {
    if (midy >= y1 && midy <= y2) {
      cout << "YES";
      return 0;
    }
  }
  x1 = 2e9;
  y1 = 2e9;
  y2 = -2e9;
  x2 = -2e9;
  for (int i = 0; i < 4; i++) {
    int x, y;
    x = a[i].x, y = a[i].y;
    a[i].x = x + y;
    a[i].y = x - y;
    x = b[i].x, y = b[i].y;
    b[i].x = x + y;
    b[i].y = x - y;
    x1 = min(x1, b[i].x);
    y1 = min(y1, b[i].y);
    x2 = max(x2, b[i].x);
    y2 = max(y2, b[i].y);
  }
  for (int i = 0; i < 4; i++) {
    if (a[i].x >= x1 && a[i].x <= x2) {
      if (a[i].y >= y1 && a[i].y <= y2) {
        cout << "YES";
        return 0;
      }
    }
  }
  midx = (a[0].x + a[2].x) / 2;
  midy = (a[1].y + a[3].y) / 2;
  if (midx >= x1 && midx <= x2) {
    if (midy >= y1 && midy <= y2) {
      cout << "YES";
      return 0;
    }
  }
  cout << "NO";
  return 0;
}
