#include <bits/stdc++.h>
using namespace std;
const int MAX = 10000 + 5;
pair<int, int> a[4], b[4];
double c1x, c1y, c2x, c2y;
bool comp(pair<int, int> i, pair<int, int> j) {
  if (i.first == j.first) return i.second > j.second;
  return i.first < j.first;
}
int main() {
  for (int i = 0; i < 4; i++) scanf("%d %d", &a[i].first, &a[i].second);
  sort(a, a + 4, comp);
  c1x = (double)(a[0].first + a[2].first) / 2.0;
  c1y = (double)(a[0].second + a[2].second) / 2.0;
  for (int i = 0; i < 4; i++) scanf("%d %d", &b[i].first, &b[i].second);
  sort(b, b + 4, comp);
  c2x = b[1].first;
  c2y = b[0].second;
  bool ghotona = false;
  for (int i = 0; i < 4; i++)
    if (a[0].first <= b[i].first && b[i].first <= a[2].first &&
        b[i].second >= a[1].second && b[i].second <= a[0].second)
      ghotona = true;
  if (c2x >= a[0].first && c2x <= a[2].first && c2y >= a[1].second &&
      c2y <= a[0].second)
    ghotona = true;
  for (int i = 0; i < 4; i++) {
    double dis = fabs(c2x - a[i].first) + fabs(c2y - a[i].second);
    double half_diagonal = (b[3].first - b[0].first) / 2.0;
    if (dis <= half_diagonal) ghotona = true;
  }
  if (fabs(c2x - c1x) + fabs(c2y - c1y) <= (b[3].first - b[0].first) / 2.0)
    ghotona = true;
  printf("%s\n", ghotona ? "YES" : "NO");
  return 0;
}
