#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1000000007LL;
const long long int big = 2.19e15 + 1;
const long double pai = 3.141592653589793238462643383279502884197;
const long double eps = 1e-15;
template <class T, class U>
void mineq(T& a, U b) {
  if (a > b) {
    a = b;
  }
}
template <class T, class U>
void maxeq(T& a, U b) {
  if (a < b) {
    a = b;
  }
}
long long int gcd(long long int a, long long int b) {
  if (a % b == 0) {
    return b;
  } else
    return gcd(b, a % b);
}
long long int lcm(long long int a, long long int b) {
  return a / gcd(a, b) * b;
}
template <class T>
void SO(T& ve) {
  sort(ve.begin(), ve.end());
}
template <class T>
void REV(T& ve) {
  reverse(ve.begin(), ve.end());
}
long long int LBI(vector<int>& ar, int in) {
  return lower_bound(ar.begin(), ar.end(), in) - ar.begin();
}
long long int UBI(vector<int>& ar, int in) {
  return upper_bound(ar.begin(), ar.end(), in) - ar.begin();
}
int main(void) {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int i, Xs = mod, Xb = -mod, Ys = mod, Yb = -mod, Ps = mod, Pb = -mod,
         Ms = mod, Mb = -mod;
  for (i = 0; i < 4; i++) {
    int x, y;
    cin >> x >> y;
    mineq(Xs, x);
    maxeq(Xb, x);
    mineq(Ys, y);
    maxeq(Yb, y);
  }
  for (i = 0; i < 4; i++) {
    int x, y;
    cin >> x >> y;
    mineq(Ps, x + y);
    maxeq(Pb, x + y);
    mineq(Ms, x - y);
    maxeq(Mb, x - y);
  }
  for (int x = -100; x <= 100; x++) {
    for (int y = -100; y <= 100; y++) {
      if (Xs <= x && x <= Xb && Ys <= y && y <= Yb && Ps <= x + y &&
          x + y <= Pb && Ms <= x - y && x - y <= Mb) {
        cout << "YES" << endl;
        return 0;
      }
    }
  }
  cout << "NO" << endl;
  return 0;
}
