#include <bits/stdc++.h>
using namespace std;
pair<double, double> a, b, c, d, p, q, r, s, m;
double dist(pair<double, double> t, pair<double, double> g) {
  return ((t.first - g.first) * (t.first - g.first) +
          (t.second - g.second) * (t.second - g.second));
}
bool sthulo(pair<double, double> t, pair<double, double> g,
            pair<double, double> x) {
  return (dist(x, t) > (dist(x, g) + dist(t, g)) ||
          dist(x, g) > (dist(x, t) + dist(t, g)));
}
bool vitore(pair<double, double> t) {
  if (t.first >= a.first && t.first <= c.first)
    if (t.second >= a.second && t.second <= c.second) return true;
  swap(a, c);
  if (t.first >= a.first && t.first <= c.first)
    if (t.second >= a.second && t.second <= c.second) return true;
  swap(a, c);
  if (t.first >= a.first && t.first <= c.first)
    if (t.second >= c.second && t.second <= a.second) return true;
  swap(a, c);
  if (t.first >= a.first && t.first <= c.first)
    if (t.second >= c.second && t.second <= a.second) return true;
  return false;
}
bool vitoretwo(pair<double, double> t) {
  return !(sthulo(p, q, t) || sthulo(q, r, t));
}
int main() {
  cin >> a.first >> a.second >> b.first >> b.second >> c.first >> c.second >>
      d.first >> d.second;
  cin >> p.first >> p.second >> q.first >> q.second >> r.first >> r.second >>
      s.first >> s.second;
  a.first += 200;
  b.first += 200;
  c.first += 200;
  d.first += 200;
  p.first += 200;
  q.first += 200;
  r.first += 200;
  s.first += 200;
  a.second += 200;
  b.second += 200;
  c.second += 200;
  d.second += 200;
  p.second += 200;
  q.second += 200;
  r.second += 200;
  s.second += 200;
  m.first = (a.first + c.first) / 2;
  m.second = (a.second + c.second) / 2;
  if (vitore(p) || vitore(q) || vitore(r) || vitore(s))
    cout << "Yes\n";
  else if (vitoretwo(a) || vitoretwo(b) || vitoretwo(c) || vitoretwo(d) ||
           vitoretwo(m))
    cout << "Yes\n";
  else
    cout << "No\n";
  return 0;
}
