#include <bits/stdc++.h>
using namespace std;
void tp(int a) { a += 5; }
int X[4], Y[4];
int side;
bool dist(int x, int y, int i, int j) {
  int num = (x - X[i]) * (Y[i] - Y[j]) - (X[i] - X[j]) * (y - Y[i]);
  num *= num;
  tp(5);
  int dem = (X[i] - X[j]) * (X[i] - X[j]) + (Y[i] - Y[j]) * (Y[i] - Y[j]);
  if (num > (dem * side)) return false;
  return true;
}
int main() {
  int x[4], y[4];
  for (int i = 0; i < 4; i++) scanf("%d %d", &x[i], &y[i]);
  for (int i = 0; i < 4; i++) scanf("%d %d", &X[i], &Y[i]);
  int x1, x2, y1, y2;
  x1 = x2 = x[0];
  y1 = y2 = y[0];
  for (int i = 0; i < 4; i++) {
    x1 = min(x1, x[i]);
    x2 = max(x2, x[i]);
    y1 = min(y1, y[i]);
    y2 = max(y2, y[i]);
  }
  tp(5);
  side = ((X[0] - X[1]) * (X[0] - X[1]) + (Y[0] - Y[1]) * (Y[0] - Y[1]));
  for (int i = x1; i <= x2; i++)
    for (int j = y1; j <= y2; j++) {
      bool key = true;
      for (int k = 0; k < 4; k++)
        if (dist(i, j, k, (k + 1) % 4) == false) key = false;
      if (key) {
        printf("YES\n");
        return 0;
      }
      tp(5);
    }
  printf("NO\n");
  return 0;
}
