#include <bits/stdc++.h>
using namespace std;
pair<int, int> a[4], b[4];
bool check(double x, double y, int l, int r, int u, int d) {
  return l <= x && x <= r && d <= y && y <= u;
}
bool gao() {
  double x = (b[0].first + b[1].first + b[2].first + b[3].first) / 4,
         y = (b[0].second + b[1].second + b[2].second + b[3].second) / 4;
  int u = max({a[0].second, a[1].second, a[2].second, a[3].second});
  int d = min({a[0].second, a[1].second, a[2].second, a[3].second});
  int l = min({a[0].first, a[1].first, a[2].first, a[3].first});
  int r = max({a[0].first, a[1].first, a[2].first, a[3].first});
  bool flag = check(x, y, l, r, u, d);
  for (int i = 0; i < 4; i++)
    flag |= check(b[i].first, b[i].second, l, r, u, d);
  return flag;
}
int main() {
  for (int i = 0; i < 4; i++) scanf("%d%d", &a[i].first, &a[i].second);
  for (int i = 0; i < 4; i++) scanf("%d%d", &b[i].first, &b[i].second);
  if (gao()) return 0 * puts("YES");
  for (int i = 0; i < 4; i++) swap(a[i], b[i]);
  for (int i = 0; i < 4; i++) {
    int x = a[i].first, y = a[i].second;
    a[i].first = x + y, a[i].second = x - y;
    x = b[i].first, y = b[i].second;
    b[i].first = x + y, b[i].second = x - y;
  }
  if (gao())
    puts("YES");
  else
    puts("NO");
  return 0;
}
