#include <bits/stdc++.h>
using namespace std;
int xl, xr, yl, yr;
int xx[5], yy[5];
int inside(int x, int y) { return xl <= x && x <= xr && yl <= y && y <= yr; }
int fuck(int x, int y) {
  int sum = 0;
  for (int i = 0; i <= 3; ++i) {
    int j = (i + 1) % 4;
    sum += abs((x - xx[i]) * (y - yy[j]) - (x - xx[j]) * (y - yy[i]));
  }
  return sum;
}
int main() {
  scanf("%d%d", &xl, &yl);
  xr = xl, yr = yl;
  for (int i = 1; i <= 3; ++i) {
    int x, y;
    scanf("%d%d", &x, &y);
    xl = min(xl, x);
    xr = max(xr, x);
    yl = min(yl, y);
    yr = max(yr, y);
  }
  xl *= 10;
  yl *= 10;
  xr *= 10;
  yr *= 10;
  for (int i = 0; i <= 3; ++i) {
    scanf("%d%d", &xx[i], &yy[i]);
    xx[i] *= 10;
    yy[i] *= 10;
  }
  for (int i = 0; i <= 3; ++i) {
    int j = (i + 1) % 4;
    int dx, dy;
    if (xx[j] == xx[i])
      dx = 0;
    else
      dx = xx[j] > xx[i] ? 1 : -1;
    if (yy[j] == yy[i])
      dy = 0;
    else
      dy = yy[j] > yy[i] ? 1 : -1;
    for (int x = xx[i], y = yy[i]; x != xx[j] && y != yy[j]; x += dx, y += dy)
      if (inside(x, y)) {
        puts("Yes");
        return 0;
      }
  }
  int S = fuck(xx[0], yy[0]);
  if (fuck(xl, yl) == S && fuck(xl, yr) == S && fuck(xr, yl) == S &&
      fuck(xr, yr) == S) {
    return puts("Yes"), 0;
  }
  puts("No");
  return 0;
}
