#include <bits/stdc++.h>
using namespace std;
const int AX = 1e2 + 6;
int main() {
  int x_min = 0x3f3f3f3f, x_max = -0x3f3f3f3f, y_min = 0x3f3f3f3f,
      y_max = -0x3f3f3f3f;
  int x, y;
  for (int i = 0; i < 4; i++) {
    cin >> x >> y;
    x_min = min(x_min, x);
    x_max = max(x_max, x);
    y_min = min(y_min, y);
    y_max = max(y_max, y);
  }
  int x1_min = 0x3f3f3f3f, x1_max = -0x3f3f3f3f, y1_min = 0x3f3f3f3f,
      y1_max = -0x3f3f3f3f;
  for (int i = 0; i < 4; i++) {
    cin >> x >> y;
    x1_min = min(x1_min, x);
    x1_max = max(x1_max, x);
    y1_min = min(y1_min, y);
    y1_max = max(y1_max, y);
  }
  if (y1_min > y_max || y1_max < y_min || x1_min > x_max || x1_max < x_min)
    return 0 * printf("NO\n");
  int c = min(abs(x_min - x1_max), abs(x_max - x1_min));
  int d = min(abs(y_min - y1_max), abs(y_max - y1_min));
  int len = (c + d) * 2;
  if (len < abs(y1_min - y1_max))
    printf("NO\n");
  else
    printf("YES\n");
  return 0;
}
