#include <bits/stdc++.h>
using namespace std;
template <typename T>
void LOG(T const& t) {
  std::cout << t << endl;
}
template <typename First, typename... Rest>
void LOG(First const& first, Rest const&... rest) {
  std::cout << first << " ";
  LOG(rest...);
}
void solve();
int main() {
  ios_base::sync_with_stdio(NULL);
  cin.tie(NULL);
  solve();
  return 0;
}
pair<int, int> rec1[4];
pair<int, int> rec2[4];
double area(int x1, int y1, int x2, int y2, int x3, int y3) {
  return abs((x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2)) / 2.0);
}
bool check(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4,
           int x, int y) {
  double A = area(x1, y1, x2, y2, x3, y3) + area(x1, y1, x4, y4, x3, y3);
  double A1 = area(x, y, x1, y1, x2, y2);
  double A2 = area(x, y, x2, y2, x3, y3);
  double A3 = area(x, y, x3, y3, x4, y4);
  double A4 = area(x, y, x1, y1, x4, y4);
  return fabs(A - (A1 + A2 + A3 + A4)) <= 0.0001;
}
void solve() {
  int x, y;
  for (int i = 0; i < 4; i++) {
    cin >> x >> y;
    rec1[i] = make_pair(x, y);
  }
  for (int i = 0; i < 4; i++) {
    cin >> x >> y;
    rec2[i] = make_pair(x, y);
  }
  for (int i = -100; i <= 100; i++) {
    for (int j = -100; j <= 100; j++) {
      if (check(rec2[0].first, rec2[0].second, rec2[1].first, rec2[1].second,
                rec2[2].first, rec2[2].second, rec2[3].first, rec2[3].second, i,
                j) &&
          check(rec1[0].first, rec1[0].second, rec1[1].first, rec1[1].second,
                rec1[2].first, rec1[2].second, rec1[3].first, rec1[3].second, i,
                j)) {
        cout << "YES" << endl;
        return;
      }
    }
  }
  cout << "NO" << endl;
}
