#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const double EPS = 1e-9;
const double INF = 1e50;
struct pt;
int cmp(double a, double b = 0.0) {
  if (fabs(a - b) < EPS) return 0;
  return a > b ? 1 : -1;
}
struct pt {
  double x, y;
  pt(double x = 0.0, double y = 0.0) : x(x), y(y) {}
  double length() { return sqrt(x * x + y * y); }
  double length2() { return x * x + y * y; }
  pt normalize() { return (*this) / length(); }
  pt operator-(pt p) { return pt(x - p.x, y - p.y); }
  pt operator+(pt p) { return pt(x + p.x, y + p.y); }
  pt operator*(double k) { return pt(x * k, y * k); }
  pt operator/(double k) { return pt(x / k, y / k); }
  bool operator<(const pt& p) const {
    if (fabs(x - p.x) >= EPS) return x < p.x;
    return y < p.y;
  }
  bool operator==(const pt p) {
    return (fabs(x - p.x) < EPS && fabs(y - p.y) < EPS);
  }
};
double dist(pt a, pt b) { return (a - b).length(); }
double dot(pt a, pt b) { return a.x * b.x + a.y * b.y; }
double cross(pt a, pt b) { return a.x * b.y - a.y * b.x; }
double signed_area(pt a, pt b, pt c) { return cross((a - c), (b - c)) / 2.0; }
int side_sign(pt a, pt b, pt c) { return cmp(signed_area(a, b, c)); }
bool cw(pt a, pt b, pt c) { return cmp(signed_area(a, b, c)) > 0; }
bool ccw(pt a, pt b, pt c) { return cmp(signed_area(a, b, c)) < 0; }
bool colinear(pt a, pt b, pt c) { return !cmp(signed_area(a, b, c)); }
bool inside_convex_poly(pt p, vector<pt>& poly) {
  int left = 0, right = 0, side;
  for (int i = 0; i < poly.size(); i++) {
    side = side_sign(p, poly[i], poly[(i + 1) % poly.size()]);
    if (side < 0) right++;
    if (side > 0) left++;
  }
  return !(left && right);
}
int main() {
  int n;
  vector<pt> p[2];
  for (int i = 0; i < 2; i++) {
    for (int j = 0; j < 4; j++) {
      int x, y;
      scanf("%d %d", &x, &y);
      p[i].push_back(pt(x, y));
    }
  }
  for (int x = -200; x <= 200; x++) {
    for (int y = -200; y <= 200; y++) {
      pt pp = pt(x, y);
      if (inside_convex_poly(pp, p[0]) && inside_convex_poly(pp, p[1])) {
        puts("YES");
        return 0;
      }
    }
  }
  puts("NO");
  return 0;
}
