#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  return (!b) ? a : gcd(b, a % b);
}
pair<int, int> pt[2][5];
int isb(int a, int b, int c) {
  return ((a <= b && b <= c) || (c <= b && b <= a));
}
long long int mxc = 100;
void solve() {
  for (int i = 1; i <= 4; i++) cin >> pt[0][i].first >> pt[0][i].second;
  for (int i = 1; i <= 4; i++) cin >> pt[1][i].first >> pt[1][i].second;
  sort(pt[0] + 1, pt[0] + 5);
  sort(pt[1] + 1, pt[1] + 5);
  int f = 0;
  for (int x = -mxc; x <= mxc; x++) {
    for (int y = -mxc; y <= mxc; y++) {
      f |= (isb(pt[0][1].first, x, pt[0][3].first) &&
            isb(pt[0][3].second, y, pt[0][4].second) &&
            isb(pt[1][1].first + pt[1][1].second, x + y,
                pt[1][4].first + pt[1][4].second) &&
            isb(-pt[1][3].first + pt[1][3].second, -x + y,
                -pt[1][4].first + pt[1][4].second));
    }
  }
  cout << (f ? "YES" : "NO");
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  if (fopen("input.txt", "r")) {
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
  }
  int t = 1;
  while (t--) {
    solve();
  }
}
