#include <bits/stdc++.h>
using namespace std;
int i, j, x[10], y[10], u[10], v[10];
int d(int x, int y, int u, int v) {
  return (x - u) * (x - u) + (y - v) * (y - v);
}
bool one(int i, int j) {
  return i >= x[0] && i <= x[2] && j >= y[0] && j <= y[2];
}
bool two(int i, int j) {
  for (int k = 0; k < 4; k++)
    if (i == u[k] && j == v[k]) return 1;
  int x, y = 0;
  x = j - v[0] + u[0];
  if (x >= u[0] && x <= u[2]) {
    if (x == i)
      return 1;
    else if (x > i)
      y++;
  }
  x = -1 * (j - v[0] - u[0]);
  if (x >= u[0] && x <= u[1]) {
    if (x == i)
      return 1;
    else if (x > i)
      y++;
  }
  x = j - v[3] + u[3];
  if (x >= u[1] && x <= u[3]) {
    if (x == i)
      return 1;
    else if (x > i)
      y++;
  }
  x = -1 * (j - v[3] - u[3]);
  if (x >= u[1] && x <= u[3]) {
    if (x == i)
      return 1;
    else if (x > i)
      y++;
  }
  return y == 1;
}
int main() {
  for (i = 0; i < 4; i++) cin >> x[i] >> y[i];
  for (i = 0; i < 4; i++) cin >> u[i] >> v[i];
  sort(x, x + 4);
  sort(y, y + 4);
  for (i = 0; i < 4; i++)
    for (j = i + 1; j < 4; j++)
      if (u[i] > u[j] || (u[i] == u[j] && v[i] > v[j])) {
        swap(u[i], u[j]);
        swap(v[i], v[j]);
      }
  for (i = -100; i <= 100; i++)
    for (j = -100; j <= 100; j++)
      if (one(i, j) && two(i, j)) {
        cout << "YES";
        return 0;
      }
  cout << "NO";
  return 0;
}
