#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
void solve() {
  vector<int> ax, ay, bx, by;
  pair<int, int> p[4], p1[4];
  for (int i = 0; i < 4; i++) {
    int x, y;
    cin >> x >> y;
    p1[i].first = x;
    p1[i].second = y;
    ax.push_back(x);
    ay.push_back(y);
  }
  for (int i = 0; i < 4; i++) {
    int x, y;
    cin >> x >> y;
    p[i].first = x;
    p[i].second = y;
    bx.push_back(x);
    by.push_back(y);
  }
  sort(ax.begin(), ax.end());
  sort(ay.begin(), ay.end());
  sort(bx.begin(), bx.end());
  sort(by.begin(), by.end());
  int mnx = *min_element(ax.begin(), ax.end()),
      mxx = *max_element(ax.begin(), ax.end());
  int mny = *min_element(ay.begin(), ay.end()),
      mxy = *max_element(ay.begin(), ay.end());
  int diff = bx[1] - bx[0];
  int cnt = 0;
  for (int i = by[3]; i >= by[1]; i--) {
    for (int j = 0; j <= cnt; j++) {
      int p = bx[1] - j, q = i;
      if ((p >= mnx and p <= mxx) and (q >= mny and q <= mxy)) {
        cout << "YES";
        return;
      }
      p = bx[1] + j;
      if ((p >= mnx and p <= mxx) and (q >= mny and q <= mxy)) {
        cout << "YES";
        return;
      }
    }
    cnt++;
  }
  cnt = 0;
  for (int i = by[0]; i <= by[2]; i++) {
    for (int j = 0; j <= cnt; j++) {
      int p = bx[1] - j, q = i;
      if ((p >= mnx and p <= mxx) and (q >= mny and q <= mxy)) {
        cout << "YES";
        return;
      }
      p = bx[1] + j;
      if ((p >= mnx and p <= mxx) and (q >= mny and q <= mxy)) {
        cout << "YES";
        return;
      }
    }
    cnt++;
  }
  cout << "NO";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  solve();
}
