#include <bits/stdc++.h>
using namespace std;
template <typename T>
T Abs(T first) {
  return (first < 0 ? -first : first);
}
template <typename T>
T Sqr(T first) {
  return (first * first);
}
string plural(string s) {
  return (int((s).size()) && s[int((s).size()) - 1] == 'x' ? s + "en"
                                                           : s + "s");
}
const int INF = (int)1e9;
const long double EPS = 1e-12;
const long double PI = acos(-1.0);
bool Read(int &first) {
  char c, r = 0, n = 0;
  first = 0;
  for (;;) {
    c = getchar();
    if ((c < 0) && (!r)) return (0);
    if ((c == '-') && (!r))
      n = 1;
    else if ((c >= '0') && (c <= '9'))
      first = first * 10 + c - '0', r = 1;
    else if (r)
      break;
  }
  if (n) first = -first;
  return (1);
}
bool ReadLL(long long &first) {
  char c, r = 0, n = 0;
  first = 0;
  for (;;) {
    c = getchar();
    if ((c < 0) && (!r)) return (0);
    if ((c == '-') && (!r))
      n = 1;
    else if ((c >= '0') && (c <= '9'))
      first = first * 10 + c - '0', r = 1;
    else if (r)
      break;
  }
  if (n) first = -first;
  return (1);
}
int main() {
  if (0) freopen("in.txt", "r", stdin);
  int N, M, K;
  int i, j, k, a, b, c, first, second, z;
  int x1, y1, x2, y2;
  set<pair<int, int> > S;
  x1 = y1 = INF;
  x2 = y2 = -INF;
  for (i = 0; i < 4; i++) {
    Read(first), Read(second);
    x1 = min(x1, first);
    x2 = max(x2, first);
    y1 = min(y1, second);
    y2 = max(y2, second);
  }
  int X1, Y1, X2, Y2;
  X1 = Y1 = INF;
  X2 = Y2 = -INF;
  for (i = 0; i < 4; i++) {
    Read(first), Read(second);
    X1 = min(X1, first);
    X2 = max(X2, first);
    Y1 = min(Y1, second);
    Y2 = max(Y2, second);
  }
  int sx = (X1 + X2) / 2;
  int sy = (Y1 + Y2) / 2;
  int L = X2 - sx;
  for (first = x1; first <= x2; first++)
    for (second = y1; second <= y2; second++)
      S.insert(make_pair(first, second));
  for (i = 0; i < L + 1; i++)
    for (a = -1; a <= 1; a += 2) {
      second = sy - (L - i) * a;
      for (first = sx - i; first <= sx + i; first++)
        if (S.count(make_pair(first, second))) goto Good;
    }
  printf("NO\n");
  return (0);
Good:;
  printf("YES\n");
  return (0);
}
