#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  float arr1[5][2], arr2[5][2], center[2], ln1, c[2];
  int ans = 0;
  for (int i = 0; i < 4; i++) {
    cin >> arr1[i][0] >> arr1[i][1];
  }
  center[0] = (arr1[0][0] + arr1[2][0]) / 2.0;
  center[1] = (arr1[0][1] + arr1[2][1]) / 2.0;
  ln1 = max(fabs(arr1[0][0] - arr1[1][0]), fabs(arr1[0][1] - arr1[1][1]));
  for (int i = 0; i < 4; i++) {
    cin >> arr2[i][0] >> arr2[i][1];
    if (fabs(arr2[i][0] - center[0]) <= ln1 / 2.0 &&
        fabs(arr2[i][1] - center[1]) <= ln1 / 2.0)
      ans = 1;
  }
  c[0] = (arr2[0][0] + arr2[2][0]) / 2.0;
  c[1] = (arr2[0][1] + arr2[2][1]) / 2.0;
  if (fabs(c[0] - center[0]) <= ln1 / 2.0 &&
      fabs(c[1] - center[1]) <= ln1 / 2.0)
    ans = 1;
  if (ans == 0) {
    for (int i = 0; i < 4; i++) {
      float x = arr1[i][0], y = arr1[i][1];
      arr1[i][0] = x + y;
      arr1[i][1] = x - y;
    }
    for (int i = 0; i < 4; i++) {
      float x = arr2[i][0], y = arr2[i][1];
      arr2[i][0] = x + y;
      arr2[i][1] = x - y;
    }
    center[0] = (arr2[0][0] + arr2[2][0]) / 2.0;
    center[1] = (arr2[0][1] + arr2[2][1]) / 2.0;
    c[0] = (arr1[0][0] + arr1[2][0]) / 2.0;
    c[1] = (arr1[0][1] + arr1[2][1]) / 2.0;
    ln1 = max(fabs(arr2[0][0] - arr2[1][0]), fabs(arr2[0][1] - arr2[1][1]));
    for (int i = 0; i < 4; i++) {
      if (fabs(arr1[i][0] - center[0]) <= ln1 / 2.0 &&
          fabs(arr1[i][1] - center[1]) <= ln1 / 2.0)
        ans = 1;
    }
    if (fabs(c[0] - center[0]) <= ln1 / 2.0 &&
        fabs(c[1] - center[1]) <= ln1 / 2.0)
      ans = 1;
  }
  if (ans == 0)
    cout << "NO" << endl;
  else
    cout << "YES" << endl;
  return 0;
}
