#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 11, mod = 1e9 + 7;
const int INF1 = 2e9;
const long long INF2 = 2e18;
const int base = 500;
const int P = 31;
const int dx[] = {1, -1, 0, 0};
const int dy[] = {0, 0, 1, -1};
const double EPS = 1e-7;
const double PI = acos(-1.0);
class square {
 public:
  int x[7], y[7], minx = INF1, maxx = -INF1, miny = INF1, maxy = -INF1;
  inline void invert() {
    for (int i = 1; i <= 4; i += 1) x[i] = x[i] + y[i], y[i] = x[i] - y[i];
  }
  inline void determine() {
    for (int i = 1; i <= 4; i += 1)
      minx = min(minx, x[i]), maxx = max(maxx, x[i]), miny = min(miny, y[i]),
      maxy = max(maxy, y[i]);
  }
} sq[3];
int main() {
  if (fopen("queue"
            ".in",
            "r"))
    freopen(
        "queue"
        ".in",
        "r", stdin),
        freopen(
            "queue"
            ".out",
            "w", stdout);
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  for (int i = 1; i <= 4; i += 1) cin >> sq[1].x[i] >> sq[1].y[i];
  for (int i = 1; i <= 4; i += 1) cin >> sq[2].x[i] >> sq[2].y[i];
  sq[1].determine();
  for (int i = sq[1].minx; i <= sq[1].maxx; i += 1)
    for (int j = sq[1].miny; j <= sq[1].maxy; j += 1)
      for (int ii = 1; ii <= 4; ii += 1)
        for (int jj = 1; jj <= 4; jj += 1)
          for (int k = 1; k <= 4; k += 1)
            if (sq[2].x[ii] + sq[2].y[ii] <= i + j &&
                i + j <= sq[2].x[jj] + sq[2].y[jj] &&
                i - j <= sq[2].x[ii] - sq[2].y[ii] &&
                sq[2].x[k] - sq[2].y[k] <= i - j)
              return cout << "YES", 0;
  cout << "NO";
  return 0;
}
