#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  vector<pair<int, int>> sq1(4), sq2(4);
  for (int i = 0; i < 4; i++) {
    cin >> a >> b;
    sq1[i] = make_pair(a, b);
  }
  for (int i = 0; i < 4; i++) {
    cin >> a >> b;
    sq2[i] = make_pair(a, b);
  }
  sort(sq1.begin(), sq1.end());
  sort(sq2.begin(), sq2.end());
  if (sq2[0].first + sq2[3].first >= 2 * sq1[0].first &&
      sq2[0].first + sq2[3].first <= 2 * sq1[3].first &&
      sq2[0].second + sq2[3].second >= 2 * sq1[0].second &&
      sq2[0].second + sq2[3].second <= 2 * sq1[3].second) {
    cout << "YES";
    return 0;
  }
  for (int i = 0; i < 4; i++) {
    if (sq2[i].first >= sq1[0].first && sq2[i].first <= sq1[3].first &&
        sq2[i].second >= sq1[0].second && sq2[i].second <= sq1[3].second) {
      cout << "YES";
      return 0;
    }
  }
  for (int i = 0; i < 4; i++) {
    if (sq1[i].second - sq1[i].first >= sq2[1].second - sq2[1].first &&
        sq1[i].second - sq1[i].first <= sq2[0].second - sq2[0].first &&
        sq1[i].second + sq1[i].first >= sq2[0].second + sq2[0].first &&
        sq1[i].second + sq1[i].first <= sq2[3].second + sq2[3].first) {
      cout << "YES";
      return 0;
    }
  }
  cout << "NO";
}
