#include <bits/stdc++.h>
using namespace std;
pair<int, int> a[4], b[4];
bool isin(pair<int, int> x) {
  return (x.first >= a[0].first) && (x.first <= a[2].first) &&
         (x.second >= a[0].second) && (x.second <= a[1].second);
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  for (int i = 0; i <= 4 - 1; i += 1) cin >> a[i].first >> a[i].second;
  for (int i = 0; i <= 4 - 1; i += 1) cin >> b[i].first >> b[i].second;
  sort(a, a + 4), sort(b, b + 4);
  for (int i = b[0].first; i <= b[3].first; i += 1) {
    int l, r;
    l = (i > b[1].first) ? (b[0].second - b[3].first + i)
                         : (b[0].second - i + b[0].first);
    r = 2 * b[0].second - l;
    for (int j = l; j <= r; j += 1)
      if (isin({i, j})) {
        cout << "YES";
        return 0;
      }
  }
  cout << "NO";
  return 0;
}
