#include <bits/stdc++.h>
#pragma GCC optimize("03")
using namespace std;
pair<int, int> a[10], b[10];
int t[250][250];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  for (int i = 1; i <= 4; i++) cin >> a[i].second >> a[i].first;
  for (int i = 1; i <= 4; i++) cin >> b[i].second >> b[i].first;
  sort(a + 1, a + 5);
  sort(b + 1, b + 5);
  for (int i = a[1].first; i <= a[3].first; i++)
    for (int j = a[1].second; j <= a[2].second; j++) t[i + 102][j + 102]++;
  int xx = b[1].first;
  int yy = b[1].second;
  int cnt = b[3].second - b[2].second + 1;
  for (int dim = 1; dim <= cnt; dim += 2) {
    for (int j = yy; j <= yy + dim - 1; j++) t[xx + 102][j + 102]++;
    xx++;
    yy--;
  }
  cnt -= 2;
  yy += 2;
  while (cnt > 0) {
    for (int j = yy; j <= yy + cnt - 1; j++) t[xx + 102][j + 102]++;
    xx++;
    yy++;
    cnt -= 2;
  }
  for (int i = -100; i <= 100; i++)
    for (int j = -100; j <= 100; j++)
      if (t[i + 102][j + 102] > 1) return cout << "YES", 0;
  cout << "NO";
  return 0;
}
