#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9 + 5;
const int maxn = 1e5 + 5;
int x1 = inf, x2 = -inf, y11 = inf, y2 = -inf, x, y;
int a1 = inf, a2 = -inf, b1 = inf, b2 = -inf;
bool check(int x, int y) {
  for (int i = a1; i <= (a2 + a1) / 2; ++i) {
    for (int j = (b1 + b2) / 2 - i + a1; j <= (b1 + b2) / 2 + i - a1; ++j) {
      if (x == i && y == j) return true;
    }
  }
  for (int i = (a2 + a1) / 2; i <= a2; ++i) {
    for (int j = b2 - i + (a2 + a1) / 2; j >= b1 + i - (a2 + a1) / 2; --j) {
      if (x == i && y == j) return true;
    }
  }
  return false;
}
int main() {
  for (int i = 1; i <= 4; ++i) {
    cin >> x >> y;
    x1 = min(x1, x);
    x2 = max(x2, x);
    y11 = min(y11, y);
    y2 = max(y2, y);
  }
  for (int i = 1; i <= 4; ++i) {
    cin >> x >> y;
    a1 = min(a1, x);
    a2 = max(a2, x);
    b1 = min(b1, y);
    b2 = max(b2, y);
  }
  for (int i = x1; i <= x2; ++i) {
    for (int j = y11; j <= y2; ++j) {
      if (check(i, j)) {
        cout << "YES\n";
        return 0;
      }
    }
  }
  cout << "NO\n";
  return 0;
}
