#include <bits/stdc++.h>
using namespace std;
int Abs(int x) {
  if (x < 0) return -x;
  return x;
}
int main(int argc, char const *argv[]) {
  ios::sync_with_stdio(false);
  cin.tie(0);
  pair<int, int> rec1[4], rec2[4];
  for (int i = 0; i < 4; ++i) {
    cin >> rec1[i].first >> rec1[i].second;
  }
  for (int i = 0; i < 4; ++i) {
    cin >> rec2[i].first >> rec2[i].second;
  }
  sort(rec1, rec1 + 4);
  sort(rec2, rec2 + 4);
  pair<int, int> org1, org2, org_dis, rec_len;
  org1 =
      make_pair(rec1[0].first + rec1[3].first, rec1[0].second + rec1[3].second);
  org2 = make_pair(2 * rec2[1].first, 2 * rec2[0].second);
  org_dis =
      make_pair(Abs(org1.first - org2.first), Abs(org1.second - org2.second));
  rec_len =
      make_pair(rec1[3].first - rec1[0].first, rec2[2].second - rec2[1].second);
  if (org_dis.first <= rec_len.first) {
    if (org_dis.second <= rec_len.first + rec_len.second) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  } else if (org_dis.first <= rec_len.first + rec_len.second) {
    if (org_dis.second <= 2 * rec_len.first + rec_len.second - org_dis.first) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
