#include <bits/stdc++.h>
using namespace std;
long long gcd(long long f, long long g) {
  if (g == 0) {
    return f;
  }
  return gcd(g, f % g);
}
bool returnorder(pair<long long, long long> a, pair<long long, long long> b) {
  return (a.first < b.first);
}
bool sortstring(const string& a, const string& b) {
  return (b.length() > a.length());
}
void pairchange(pair<long long, long long>& p) {
  long long a = p.first + p.second;
  long long b = p.first - p.second;
  p.first = a;
  p.second = b;
}
int dist(pair<long long, long long> p, pair<long long, long long> v) {
  return abs(p.first - v.first) + abs(p.second - v.second);
}
int main() {
  ios::sync_with_stdio(false);
  pair<long long, long long> sqone[4];
  pair<long long, long long> sqto[4];
  pair<long long, long long> c;
  long long summan;
  for (long long i = 0; i < 4; i++) {
    cin >> sqone[i].first >> sqone[i].second;
  }
  for (long long i = 0; i < 4; i++) {
    cin >> sqto[i].first >> sqto[i].second;
    pairchange(sqto[i]);
  }
  long long help;
  for (long long i = -101; i < 101; i++) {
    for (long long ii = -101; ii < 101; ii++) {
      c = make_pair(i, ii);
      summan = 0;
      for (long long iii = 0; iii < 4; iii++) {
        summan += dist(c, sqone[iii]);
      }
      if (summan ==
          min(dist(sqone[0], sqone[1]), dist(sqone[0], sqone[2])) * 4) {
        c = make_pair(i + ii, i - ii);
        summan = 0;
        for (long long iii = 0; iii < 4; iii++) {
          summan += dist(c, sqto[iii]);
        }
        if (summan == min(dist(sqto[0], sqto[1]), dist(sqto[0], sqto[2])) * 4) {
          cout << "YES" << endl;
          return 0;
        }
      }
    }
  }
  cout << "NO" << endl;
  return 0;
}
