#include <bits/stdc++.h>
using namespace std;
int i, j, x, y, a, b;
int main() {
  int mxa = 101, mxi = -101, mya = 101, myi = -101;
  int _mxa = 101, _mxi = -101, _mya = 101, _myi = -101;
  for (i = 1; i <= 4; i++) {
    cin >> a >> b;
    mxa = min(mxa, a);
    mxi = max(mxi, a);
    mya = min(mya, b);
    myi = max(myi, b);
  }
  for (i = 1; i <= 4; i++) {
    cin >> a >> b;
    _mxa = min(_mxa, a);
    _mxi = max(_mxi, a);
    _mya = min(_mya, b);
    _myi = max(_myi, b);
  }
  x = (_mxa + _mxi);
  y = (_mya + _myi);
  b = (_mxi - _mxa);
  for (i = -200; i <= 200; i++)
    for (j = -200; j <= 200; j++) {
      if (abs(i - x) + abs(j - y) <= b) {
        if (mxa * 2 <= i && i <= mxi * 2 && mya * 2 <= j && j <= myi * 2) {
          cout << "YES" << endl;
          return 0;
        }
      }
    }
  cout << "NO" << endl;
}
