#include <bits/stdc++.h>
using namespace std;
struct point {
  int x, y;
} a[4], b[4], p;
int A, B;
int cross(point p, point a, point b) {
  return (a.x - p.x) * (b.y - p.y) - (a.y - p.y) * (b.x - p.x);
}
int check(int x, int y) {
  p.x = x;
  p.y = y;
  int AA = 0, BB = 0;
  for (int i = (0); i <= (3); i++) {
    AA += abs(cross(p, a[i], a[(i + 1) % 4]));
    BB += abs(cross(p, b[i], b[(i + 1) % 4]));
  }
  return abs(AA) == A && abs(BB) == B;
}
int main() {
  for (int i = (0); i <= (3); i++) scanf("%d%d", &a[i].x, &a[i].y);
  for (int i = (0); i <= (3); i++) scanf("%d%d", &b[i].x, &b[i].y);
  A = abs(cross(a[0], a[1], a[2]) + cross(a[0], a[2], a[3]));
  B = abs(cross(b[0], b[1], b[2]) + cross(b[0], b[2], b[3]));
  for (int x = (-100); x <= (100); x++)
    for (int y = (-100); y <= (100); y++)
      if (check(x, y)) return puts("Yes"), 0;
  puts("No");
  return 0;
}
