#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long double pi = 3.14159265358979323846264338327950288;
struct point {
  int x, y;
};
int main() {
  point a[4];
  point b[4];
  int minX = 101, minY = 101, maxX = -101, maxY = -101;
  for (int i = 0; i < 4; i++)
    cin >> a[i].x >> a[i].y, minX = min(minX, a[i].x), maxX = max(maxX, a[i].x),
                             minY = min(minY, a[i].y), maxY = max(maxY, a[i].y);
  for (int i = 0; i < 4; i++) cin >> b[i].x >> b[i].y;
  for (int i = 0; i < 4; i++) {
    if (b[i].x >= minX && b[i].x <= maxX && b[i].y >= minY && b[i].y <= maxY) {
      cout << "YES" << endl;
      return 0;
    }
  }
  point c1, c2;
  int dif = 0, X, Y;
  for (int i = 0; i < 4; i++) {
    for (int j = i + 1; j < 4; j++) {
      if (b[i].x == b[j].x) {
        dif = abs(b[i].y - b[j].y);
        c2.x = b[i].x;
      }
      if (b[i].y == b[j].y) {
        c2.y = b[i].y;
      }
    }
  }
  c1.x = (minX + maxX) / 2, c1.y = (minY + maxY) / 2;
  for (int i = 0; i < 4; i++) {
    int dif1 = abs(a[i].x - c2.x);
    int dif2 = abs(a[i].y - c2.y);
    if ((dif1 + dif2) * 2 <= dif) {
      cout << "YES" << endl;
      return 0;
    }
  }
  if (c2.x >= minX && c2.x <= maxX && c2.y >= minY && c2.y <= maxY) {
    cout << "YES" << endl;
  } else if (abs(c1.x - c2.x) + abs(c1.y - c2.y) <= dif / 2) {
    cout << "YES" << endl;
  } else
    cout << "NO" << endl;
}
