#include <bits/stdc++.h>
using namespace std;
int main() {
  double nu, nd, nl, nr, mu, md, ml, mr, mx, my, x, y;
  nu = nr = mu = mr = -105;
  nd = nl = md = ml = 105;
  for (int i = 0; i < 4; i++) {
    cin >> x >> y;
    nd = min(nd, y);
    nu = max(nu, y);
    nl = min(nl, x);
    nr = max(nr, x);
  }
  for (int i = 0; i < 4; i++) {
    cin >> x >> y;
    md = min(md, y);
    mu = max(mu, y);
    ml = min(ml, x);
    mr = max(mr, x);
  }
  mx = (ml + mr) / 2;
  my = (mu + md) / 2;
  if (mx >= nl && mx <= nr && md >= nd && md <= nu ||
      mx >= nl && mx <= nr && mu >= nd && mu <= nu ||
      ml >= nl && ml <= nr && my >= nd && my <= nu ||
      mr >= nl && mr <= nr && my >= nd && my <= nu)
    cout << "YES" << endl;
  else if (nu + nr >= ml + my && nu <= nr - mx + mu && nu >= nr - mx + md &&
               nu + nr <= mr + my ||
           nd + nr >= ml + my && nd <= nr - mx + mu && nd >= nr - mx + md &&
               nd + nr <= mr + my)
    cout << "YES" << endl;
  else if (nu + nl >= ml + my && nu <= nl - mx + mu && nu >= nl - mx + md &&
               nu + nl <= mr + my ||
           nd + nl >= ml + my && nd <= nl - mx + mu && nd >= nl - mx + md &&
               nd + nl <= mr + my)
    cout << "YES" << endl;
  else if (mx >= nl && mx <= nr && my >= nd && my <= nu)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
