#include <bits/stdc++.h>
const long long sze = 2e5 + 50, psze = 30, INF = 1e18;
const double eps = 1e-9;
using namespace std;
vector<long long> vertices[sze];
vector<char> visit(sze);
vector<long long> dp(sze);
vector<long long> arr(sze);
bool did_dp[100];
bool checker[sze];
long long n;
long long m;
long long k;
long long cnt = 0;
char tbl[100][100];
long long cnts[sze];
long long f[8];
long long s[8];
bool inside(long long x, long long y, long long f[8], long long S) {
  cnt = 0;
  cnt += abs((f[0] - x) * (f[7] - y) - (f[1] - y) * (f[6] - x));
  cnt += abs((f[0] - x) * (f[3] - y) - (f[1] - y) * (f[2] - x));
  cnt += abs((f[4] - x) * (f[7] - y) - (f[5] - y) * (f[6] - x));
  cnt += abs((f[4] - x) * (f[3] - y) - (f[5] - y) * (f[2] - x));
  return (cnt / 2 == S);
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  for (long long i = 0; i < 8; i++) {
    cin >> f[i];
  }
  for (long long i = 0; i < 8; i++) {
    cin >> s[i];
  }
  long long F = max(abs(f[2] - f[0]), abs(f[3] - f[1]));
  F *= F;
  long long S =
      abs((s[6] - s[0]) * (s[3] - s[1]) - (s[2] - s[0]) * (s[7] - s[1]));
  for (long long i = -100; i <= 100; i++) {
    for (long long j = -100; j <= 100; j++) {
      if (inside(i, j, f, F) && inside(i, j, s, S)) {
        cout << "YES";
        return 0;
      }
    }
  }
  cout << "NO";
  return 0;
}
