#include <bits/stdc++.h>
using namespace std;
pair<int, int> a[5];
pair<int, int> b[5];
int main(int argc, char const* argv[]) {
  int x1 = 0;
  int y1 = 0;
  for (int i = 0; i < 4; i++) {
    cin >> a[i].first >> a[i].second;
    a[i].first *= 2;
    a[i].second *= 2;
    x1 += a[i].first;
    y1 += a[i].second;
  }
  int x2 = 0, y2 = 0;
  for (int i = 0; i < 4; i++) {
    cin >> b[i].first >> b[i].second;
    b[i].first *= 2;
    b[i].second *= 2;
    x2 += b[i].first;
    y2 += b[i].second;
  }
  x1 /= 4;
  y1 /= 4;
  x2 /= 4;
  y2 /= 4;
  int d1 = max(abs(y1 - a[0].second), abs(x1 - a[0].first));
  int d2 = abs(x2 - b[0].first) + abs(y2 - b[0].second);
  a[4] = pair<int, int>(x1, y1);
  b[4] = pair<int, int>(x2, y2);
  for (int i = 0; i <= 4; i++) {
    if (max(abs(b[i].first - x1), abs(b[i].second - y1)) <= d1) {
      printf("YES\n");
      exit(0);
    }
  }
  for (int i = 0; i <= 4; i++) {
    if ((abs(a[i].first - x2) + abs(a[i].second - y2)) <= d2) {
      printf("YES\n");
      exit(0);
    }
  }
  printf("NO\n");
  return 0;
}
