#include <bits/stdc++.h>
using namespace std;
int a[1000][1000] = {0};
int main() {
  int xa[5], ya[5], xb[5], yb[5], minx, maxx, miny, maxy;
  minx = 1e9, maxx = 0, miny = 1e9, maxy = 0;
  for (int i = 1; i <= 4; i++) {
    scanf("%d%d", &xa[i], &ya[i]);
    xa[i] += 100;
    ya[i] += 100;
    minx = min(minx, xa[i]);
    maxx = max(maxx, xa[i]);
    miny = min(miny, ya[i]);
    maxy = max(maxy, ya[i]);
  }
  for (int i = minx; i <= maxx; i++) {
    for (int j = miny; j <= maxy; j++) {
      a[i][j] = 1;
    }
  }
  vector<int> x, y;
  set<int> a1, a2;
  for (int i = 1; i <= 4; i++) {
    scanf("%d%d", &xb[i], &yb[i]);
    xb[i] += 100;
    yb[i] += 100;
    a1.insert(xb[i]);
    a2.insert(yb[i]);
  }
  while (!a1.empty()) {
    x.push_back(*(a1.begin()));
    a1.erase(a1.begin());
  }
  while (!a2.empty()) {
    y.push_back(*(a2.begin()));
    a2.erase(a2.begin());
  }
  sort(x.begin(), x.end());
  sort(y.begin(), y.end());
  int s1 = y[1], s2 = y[1];
  for (int i = x[0]; i <= x[1]; i++) {
    for (int j = y[1]; j <= s1; j++) {
      if (a[i][j]) {
        printf("YES\n");
        return 0;
      }
    }
    s1++;
    for (int j = y[1]; j >= s2; j--) {
      if (a[i][j]) {
        printf("YES\n");
        return 0;
      }
    }
    s2--;
  }
  s1 = y[1], s2 = y[1];
  for (int i = x[2]; i >= x[1]; i--) {
    for (int j = y[1]; j <= s1; j++) {
      if (a[i][j]) {
        printf("YES\n");
        return 0;
      }
    }
    s1++;
    for (int j = y[1]; j >= s2; j--) {
      if (a[i][j]) {
        printf("YES\n");
        return 0;
      }
    }
    s2--;
  }
  printf("NO\n");
  return 0;
}
