#include <bits/stdc++.h>
using namespace std;
int readInt() {
  int x;
  cin >> x;
  return x;
}
template <typename T>
void printVector(const vector<T>& v) {
  for (const auto& u : v) {
    cout << u << " ";
  }
}
template <typename T>
void printVector(const vector<vector<T>>& v) {
  for (const auto& u : v) {
    printVector(u);
    cout << "\n";
  }
}
void read_square(vector<pair<int, int>>* square) {
  for (int i = 0; i < 4; ++i) {
    square->push_back(make_pair(2 * readInt(), 2 * readInt()));
  }
};
int getArea(pair<int, int> A, pair<int, int> B, pair<int, int> C) {
  pair<int, int> f = make_pair(B.first - A.first, B.second - A.second);
  pair<int, int> s = make_pair(C.first - A.first, C.second - A.second);
  return s.first * f.second - s.second * f.first;
};
int getArea(vector<pair<int, int>> square) {
  return 2 * getArea(square[0], square[1], square[2]);
};
bool isInside(pair<int, int> point, vector<pair<int, int>> square) {
  int area = abs(getArea(square));
  int area1 = getArea(point, square[0], square[1]);
  int area2 = getArea(point, square[1], square[2]);
  int area3 = getArea(point, square[2], square[3]);
  int area4 = getArea(point, square[3], square[0]);
  int sum = abs(area1) + abs(area2) + abs(area3) + abs(area4);
  return area == sum;
}
pair<int, int> getCentre(vector<pair<int, int>> square) {
  int x = (square[0].first + square[2].first) / 2;
  int y = (square[0].second + square[2].second) / 2;
  return make_pair(x, y);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  vector<pair<int, int>> f_square;
  vector<pair<int, int>> s_square;
  read_square(&f_square);
  read_square(&s_square);
  bool flag = false;
  vector<bool> f_bools(4);
  vector<bool> s_bools(4);
  pair<int, int> f_centre = getCentre(f_square);
  pair<int, int> s_centre = getCentre(s_square);
  for (int i = 0; i < 4; ++i) {
    f_bools[i] = isInside(f_square[i], s_square);
    s_bools[i] = isInside(s_square[i], f_square);
    flag = (flag || f_bools[i] || s_bools[i]);
  }
  if (isInside(f_centre, s_square) || isInside(s_centre, f_square)) {
    flag = true;
  }
  if (flag) {
    cout << "Yes";
  } else {
    cout << "No";
  }
  return 0;
}
