#include <bits/stdc++.h>
using namespace std;
vector<int> v1(8), v2(8), sq1, sq2;
bool func(int a, int b) {
  bool b1 = 0, b2 = 0;
  if (a >= sq1[0] && a <= sq1[1] && b <= sq1[3] && b >= sq1[2]) {
    b1 = 1;
  }
  a = a + b;
  b = a - 2 * b;
  if (a >= sq2[0] && a <= sq2[1] && b <= sq2[3] && b >= sq2[2]) {
    b2 = 1;
  }
  return b1 & b2;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  for (int i = 0; i < 8; i++) {
    cin >> v1[i];
  }
  for (int i = 0; i < 8; i++) {
    cin >> v2[i];
  }
  for (int i = 0; i < 4; i++) {
    v2[2 * i] = v2[2 * i] + v2[2 * i + 1];
    v2[2 * i + 1] = v2[2 * i] - 2 * v2[2 * i + 1];
  }
  int x2 = INT_MIN, x1 = INT_MAX, y2 = INT_MIN, y1 = INT_MAX;
  for (int i = 0; i < 4; i++) {
    x2 = max(x2, v1[2 * i]);
    x1 = min(x1, v1[2 * i]);
    y1 = min(y1, v1[2 * i + 1]);
    y2 = max(y2, v1[2 * i + 1]);
  }
  sq1 = {x1, x2, y1, y2};
  x2 = INT_MIN, x1 = INT_MAX, y2 = INT_MIN, y1 = INT_MAX;
  for (int i = 0; i < 4; i++) {
    x2 = max(x2, v2[2 * i]);
    x1 = min(x1, v2[2 * i]);
    y1 = min(y1, v2[2 * i + 1]);
    y2 = max(y2, v2[2 * i + 1]);
  }
  sq2 = {x1, x2, y1, y2};
  for (int i = -100; i <= 100; i++) {
    for (int j = -100; j <= 100; j++) {
      if (func(i, j)) {
        cout << "YES";
        return 0;
      }
    }
  }
  cout << "NO";
  return 0;
}
