#include <bits/stdc++.h>
using namespace std;
int scanst(char *a) {
  int i = 0;
  char c = 0;
  while (c < 33) c = getchar();
  while (c > 33) {
    a[i++] = c;
    c = getchar();
  }
  a[i] = 0;
  return i;
}
template <typename T>
bool scan(T &n) {
  n = 0;
  bool got = false;
  bool negative = false;
  char c = getchar();
  if (c == EOF) return false;
  while (c<'0' | c> '9') {
    if (c == '-') negative = true;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    got = true;
    n = n * 10 + c - 48;
    c = getchar();
  }
  if (negative) n = ~(n - 1);
  return got;
}
template <typename T>
inline T GCD(T a, T b) {
  a = abs(a);
  b = abs(b);
  while (b) {
    a = a % b;
    swap(a, b);
  }
  return a;
}
template <typename T>
inline T LCM(T x, T y) {
  T tp = GCD(x, y);
  if ((x / tp) * 1. * y > 9e18) return 9e18;
  return (x / tp) * y;
}
template <typename T>
inline T BigMod(T A, T B, T M) {
  T ret = 1;
  while (B) {
    if (B & 1) ret = (ret * A) % M;
    A = (A * A) % M;
    B = B >> 1;
  }
  return ret;
}
template <typename T>
inline T InvMod(T A, T M) {
  return BigMod(A, M - 2, M);
}
int gcdr(int a, int b) {
  if (a == 0) return b;
  return gcdr(b % a, a);
}
void FastIO() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.precision(20);
}
struct st {
  int x, y;
  st(int _x, int _y) {
    x = _x;
    y = _y;
  }
};
bool cmp(st A, st B) {
  if (A.x == B.x) {
    return A.y < B.y;
  }
  return A.x < B.x;
}
int arr[2000][2000] = {0};
int main() {
  FastIO();
  int i, j, k;
  vector<st> V1;
  vector<st> V2;
  bool inside = 0;
  for (i = 0; i < 4; i++) {
    int x, y;
    cin >> x >> y;
    x += 1000;
    y += 1000;
    V1.push_back(st(x, y));
  }
  sort(V1.begin(), V1.end(), cmp);
  for (i = 0; i < 4; i++) {
    int x, y;
    cin >> x >> y;
    x += 1000;
    y += 1000;
    V2.push_back(st(x, y));
  }
  sort(V2.begin(), V2.end(), cmp);
  for (j = 0; j < 4; j++) {
    if (V2[j].x >= V1[0].x && V2[j].x <= V1[2].x) {
      if (V2[j].y >= V1[0].y && V2[j].y <= V1[1].y) {
        inside = 1;
      }
    }
  }
  if (inside) {
    cout << "YES" << endl;
    return 0;
  }
  int diff = V2[1].x - V2[0].x + 1;
  for (i = V1[1].x, j = V1[1].y; i <= V1[2].x; i++) {
    int first = i;
    int diff1 = V1[2].x - V1[1].x + 1;
    for (int k = 0; k < diff1; k++) {
      int second = j - k;
      arr[first][second]++;
      if (arr[first][second] > 1) {
        inside = 1;
        cout << first << " - " << second << endl;
      }
    }
  }
  for (i = V2[0].x, j = V2[0].y; i <= V2[2].x; i++, j++) {
    for (int k = 0; k < diff; k++) {
      int first = i + k;
      int second = j - k;
      arr[first][second]++;
      if (arr[first][second] > 1) {
        inside = 1;
      }
    }
  }
  if (inside)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
