#include <bits/stdc++.h>
using namespace std;
int a[300][300];
int32_t main() {
  pair<int, int> p[4];
  for (int i = 0; i < 4; i++) cin >> p[i].first >> p[i].second;
  sort(p, p + 4);
  int l = p[1].second - p[0].second;
  for (int i = 0; i <= l; i++)
    for (int j = 0; j <= l; j++)
      a[p[0].first + i + 100][p[0].second + j + 100] = 1;
  for (int i = 0; i < 4; i++) cin >> p[i].first >> p[i].second;
  sort(p, p + 4);
  l = p[0].second - p[1].second;
  for (int i = p[0].first, j = p[0].second; i <= p[1].first && j >= p[1].second;
       i++, j--) {
    for (int k = 0; k <= l; k++) {
      if (a[i + 100 + k][k + j + 100]) {
        cout << "YES";
        return 0;
      }
    }
  }
  cout << "NO";
  return 0;
}
