#include <bits/stdc++.h>
using namespace std;
template <typename T1, typename T2>
inline void chkmin(T1 &x, T2 y) {
  if (x > y) x = y;
}
template <typename T1, typename T2>
inline void chkmax(T1 &x, T2 y) {
  if (x < y) x = y;
}
template <typename T, typename U>
inline ostream &operator<<(ostream &_out, const pair<T, U> &_p) {
  _out << _p.first << ' ' << _p.second;
  return _out;
}
template <typename T, typename U>
inline istream &operator>>(istream &_in, pair<T, U> &_p) {
  _in >> _p.first >> _p.second;
  return _in;
}
template <typename T>
inline ostream &operator<<(ostream &_out, const vector<T> &_v) {
  if (_v.empty()) {
    return _out;
  }
  _out << _v.front();
  for (auto _it = ++_v.begin(); _it != _v.end(); ++_it) {
    _out << ' ' << *_it;
  }
  return _out;
}
template <typename T>
inline istream &operator>>(istream &_in, vector<T> &_v) {
  for (auto &_i : _v) {
    _in >> _i;
  }
  return _in;
}
template <typename T>
inline ostream &operator<<(ostream &_out, const set<T> &_s) {
  if (_s.empty()) {
    return _out;
  }
  _out << *_s.begin();
  for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) {
    _out << ' ' << *_it;
  }
  return _out;
}
template <typename T>
inline ostream &operator<<(ostream &_out, const multiset<T> &_s) {
  if (_s.empty()) {
    return _out;
  }
  _out << *_s.begin();
  for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) {
    _out << ' ' << *_it;
  }
  return _out;
}
template <typename T>
inline ostream &operator<<(ostream &_out, const unordered_set<T> &_s) {
  if (_s.empty()) {
    return _out;
  }
  _out << *_s.begin();
  for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) {
    _out << ' ' << *_it;
  }
  return _out;
}
template <typename T>
inline ostream &operator<<(ostream &_out, const unordered_multiset<T> &_s) {
  if (_s.empty()) {
    return _out;
  }
  _out << *_s.begin();
  for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) {
    _out << ' ' << *_it;
  }
  return _out;
}
template <typename T, typename U>
inline ostream &operator<<(ostream &_out, const map<T, U> &_m) {
  if (_m.empty()) {
    return _out;
  }
  _out << '(' << _m.begin()->first << ": " << _m.begin()->second << ')';
  for (auto _it = ++_m.begin(); _it != _m.end(); ++_it) {
    _out << ", (" << _it->first << ": " << _it->second << ')';
  }
  return _out;
}
template <typename T, typename U>
inline ostream &operator<<(ostream &_out, const unordered_map<T, U> &_m) {
  if (_m.empty()) {
    return _out;
  }
  _out << '(' << _m.begin()->first << ": " << _m.begin()->second << ')';
  for (auto _it = ++_m.begin(); _it != _m.end(); ++_it) {
    _out << ", (" << _it->first << ": " << _it->second << ')';
  }
  return _out;
}
const string FILENAME = "input";
struct point {
  int first, second;
  point() {}
  point(int _x, int _y) {
    first = _x;
    second = _y;
  }
};
int vec(point a, point b) { return a.first * b.second - a.second * b.first; }
point operator-(point a, point b) {
  return point(a.first - b.first, a.second - b.second);
}
point a[2][4];
bool in(int id, point p) {
  bool was = false, was1 = false;
  for (int i = 0; i < 4; i++) {
    int s = vec(a[id][i] - p, a[id][(i + 1) % 4] - p);
    if (s > 0) {
      was = true;
    }
    if (s < 0) {
      was1 = true;
    }
  }
  return !(was & was1);
}
bool bad(point a, point b, point c, point d) {
  int s = vec(c - a, b - a);
  int s1 = vec(d - a, b - a);
  if (s > 0 && s1 > 0) {
    return false;
  }
  if (s < 0 && s1 < 0) {
    return false;
  }
  swap(a, c);
  swap(b, d);
  s = vec(c - a, b - a);
  s1 = vec(d - a, b - a);
  if (s > 0 && s1 > 0) {
    return false;
  }
  if (s < 0 && s1 < 0) {
    return false;
  }
  return true;
}
bool in(int id, point p, point q) {
  for (int i = 0; i < 4; i++) {
    if (bad(a[id][i], a[id][(i + 1) % 4], p, q)) {
      return true;
    }
  }
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  for (int i = 0; i < 4; i++) {
    cin >> a[0][i].first >> a[0][i].second;
  }
  for (int i = 0; i < 4; i++) {
    cin >> a[1][i].first >> a[1][i].second;
  }
  for (int t = 0; t < 2; t++) {
    for (int i = 0; i < 4; i++) {
      if (in(t ^ 1, a[t][i])) {
        cout << "Yes\n";
        exit(0);
      }
    }
  }
  for (int t = 0; t < 2; t++) {
    for (int i = 0; i < 4; i++) {
      if (in(t ^ 1, a[t][i], a[t][(i + 1) % 4])) {
        cout << "Yes\n";
        exit(0);
      }
    }
  }
  cout << "No\n";
  return 0;
}
