#include <bits/stdc++.h>
using namespace std;
const int nMax = 100010;
struct Point {
  int x, y;
};
struct Square {
  Point P[4];
  int area;
  void init() {
    area = 0;
    for (int i = 0; i < 4; ++i) {
      int j = (i + 1) % 4;
      area += (P[i].x - P[j].x) * (P[i].y + P[j].y);
    }
    area = abs(area);
  }
  bool inside(Point p) {
    int sArea = 0;
    for (int i = 0; i < 4; ++i) {
      int j = (i + 1) % 4;
      int s = 0;
      s += (p.x - P[i].x) * (p.y + P[i].y);
      s += (P[i].x - P[j].x) * (P[i].y + P[j].y);
      s += (P[j].x - p.x) * (P[j].y + p.y);
      sArea += abs(s);
    }
    return sArea == area;
  }
};
Square A, B;
int nTest;
void outerInit() {
  if (ifstream("../test.inp")) freopen("../test.inp", "r", stdin);
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout << setprecision(9) << fixed;
}
void enter() {
  for (int i = 0; i < 4; ++i) cin >> A.P[i].x >> A.P[i].y;
  for (int i = 0; i < 4; ++i) cin >> B.P[i].x >> B.P[i].y;
  A.init();
  B.init();
}
void init() {}
void solve() {
  for (int x = -100; x <= 100; ++x)
    for (int y = -100; y <= 100; ++y) {
      Point p;
      p.x = x;
      p.y = y;
      if (A.inside(p) && B.inside(p)) {
        cout << "YES";
        return;
      }
    }
  cout << "NO";
}
int main() {
  outerInit();
  nTest = 1;
  for (int i = 1; i <= nTest; ++i) {
    if (i > 1) cout << "\n";
    enter();
    init();
    solve();
  }
}
