#include <bits/stdc++.h>
using namespace std;
int x[4], y[4], a[4], b[4];
vector<int> v[2];
void yes() {
  puts("YES");
  exit(0);
}
void add(bool is, int at, int to) {
  if (is)
    v[is].push_back(y[at]), v[is].push_back(y[to]);
  else
    v[is].push_back(x[at]), v[is].push_back(x[to]);
}
void can(int a, int b) {
  if (v[0][0] <= a && v[0][1] >= a && v[1][0] <= b && v[1][1] >= b) yes();
}
int main() {
  for (int i = 0; i < 4; i++) scanf("%d%d", x + i, y + i);
  add(x[0] == x[1], 0, 1);
  add(x[1] == x[2], 1, 2);
  sort(v[0].begin(), v[0].end());
  sort(v[1].begin(), v[1].end());
  for (int i = 0; i < 4; i++) {
    scanf("%d%d", a + i, b + i);
    can(a[i], b[i]);
  }
  can((a[0] + a[2]) / 2, (b[0] + b[2]) / 2);
  int dis = b[0] != b[2] ? abs(b[0] - b[2]) : abs(a[0] - a[2]),
      mx = (a[0] + a[2]) / 2, my = (b[0] + b[2]) / 2;
  for (int i = 0; i < 4; i++) {
    int dis1 = abs(x[i] - mx) + abs(y[i] - my);
    if (dis1 * 2 <= dis) yes();
  }
  puts("NO");
}
