#include <bits/stdc++.h>
using namespace std;
const int MAXN = 5.1e5;
const int N = 5010;
struct pt {
  long long x, y;
  pt() {}
  pt(long long _x, long long _y) : x(_x), y(_y) {}
  pt operator-(const pt& p) const { return pt(x - p.x, y - p.y); }
  long long cross(const pt& p) const { return x * p.y - y * p.x; }
  long long cross(const pt& a, const pt& b) const {
    return (a - *this).cross(b - *this);
  }
  bool operator<(const pt& s) const {
    return make_pair(x, y) < make_pair(s.x, s.y);
  }
};
int sgn(const long long& x) { return x >= 0 ? x ? 1 : 0 : -1; }
bool inter1(long long a, long long b, long long c, long long d) {
  if (a > b) swap(a, b);
  if (c > d) swap(c, d);
  return max(a, c) <= min(b, d);
}
bool check_inter(const pt& a, const pt& b, const pt& c, const pt& d) {
  if (c.cross(a, d) == 0 && c.cross(b, d) == 0)
    return inter1(a.x, b.x, c.x, d.x) && inter1(a.y, b.y, c.y, d.y);
  return sgn(a.cross(b, c)) != sgn(a.cross(b, d)) &&
         sgn(c.cross(d, a)) != sgn(c.cross(d, b));
}
int main() {
  srand(time(0));
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  long long xhi = -100, xlo = 100;
  long long yhi = -100, ylo = 100;
  vector<pt> poly;
  for (int i = 0; i < 4; i++) {
    long long x, y;
    cin >> x >> y;
    ylo = min(y, ylo);
    yhi = max(y, yhi);
    xlo = min(x, xlo);
    xhi = max(x, xhi);
  }
  for (int i = 0; i < 4; i++) {
    long long x, y;
    cin >> x >> y;
    poly.emplace_back(x, y);
  }
  auto it = min_element(poly.begin(), poly.end());
  int y = it->y;
  if (++it == poly.end()) it = poly.begin();
  if (it->y > y) {
    reverse(poly.begin(), poly.end());
  }
  for (long long x = xlo; x <= xhi; ++x) {
    for (long long y = ylo; y <= yhi; ++y) {
      bool p = true;
      for (int i = 0; i < 4; ++i) {
        long long v = poly[i].cross(poly[(i + 1) % 4], pt(x, y));
        if (v < 0) p = false;
      }
      if (p) {
        cout << "YES\n";
        return 0;
      }
    }
  }
  cout << "NO\n";
  return 0;
}
