#include <bits/stdc++.h>
using namespace std;
void err(istream_iterator<string> it) {}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cout << *it << " = " << a << "\n";
  err(++it, args...);
}
const long long MOD = 1e9 + 7, N = 1e5 + 5, inf = 1e18;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  {
    int xmn = 1e3, xmx = -1e3, ymn = 1e3, ymx = -1e3;
    for (int i = 0; i < 4; i++) {
      int x, y;
      cin >> x >> y;
      xmn = min(xmn, x);
      xmx = max(xmx, x);
      ymn = min(ymn, y);
      ymx = max(ymx, y);
    }
    vector<pair<int, int> > v;
    for (int i = 0; i < 4; i++) {
      int x, y;
      cin >> x >> y;
      v.push_back({x, y});
    }
    int ma, mb, mc, md;
    ma = (v[1].second - v[0].second) / (v[1].first - v[0].first);
    mb = (v[2].second - v[1].second) / (v[2].first - v[1].first);
    mc = (v[3].second - v[2].second) / (v[3].first - v[2].first);
    md = (v[0].second - v[3].second) / (v[0].first - v[3].first);
    bool red = false;
    for (int i = -100; i < 101; i++) {
      for (int j = -100; j < 101; j++) {
        if (i >= xmn and i <= xmx and j >= ymn and j <= ymx) {
          int a = ma * (i - v[0].first) - (j - v[0].second);
          int b = mb * (i - v[1].first) - (j - v[1].second);
          int c = mc * (i - v[2].first) - (j - v[2].second);
          int d = md * (i - v[3].first) - (j - v[3].second);
          if (a * c <= 0 and b * d <= 0) {
            red = true;
            break;
          }
        }
      }
      if (red) break;
    }
    if (red)
      cout << "YES";
    else
      cout << "NO";
    cout << "\n";
    ;
  }
}
