#include <bits/stdc++.h>
using namespace std;
void doRoutine() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
}
bool isInside(pair<long long int, long long int> p,
              pair<long long int, long long int> a[]) {
  return (p.first >= a[0].first) && (p.second >= a[0].second) &&
         (p.first <= a[3].first) && (p.second <= a[3].second);
}
signed main() {
  doRoutine();
  pair<long long int, long long int> a[4], b[4];
  for (long long int i = 0; i < 4; i++) cin >> a[i].first >> a[i].second;
  for (long long int i = 0; i < 4; i++) cin >> b[i].first >> b[i].second;
  sort(a, a + 4);
  sort(b, b + 4);
  for (long long int i = b[0].first; i <= b[3].first; i++) {
    long long int f =
        b[0].second - (i <= b[1].first ? (i - b[0].first) : (b[3].first - i));
    long long int s = (2 * b[0].second) - f;
    for (long long int j = f; j <= s; j++) {
      if (isInside({i, j}, a)) return cout << "Yes" << '\n', 0;
    }
  }
  cout << "No" << '\n';
  return 0;
}
