#include <bits/stdc++.h>
using namespace std;
const double PI = 2 * acos(0.0);
template <class T>
void show(const vector<T> &a) {
  for (T x : a) cout << x << " ";
  cout << endl;
}
int xmin1;
int xmax1;
int ymin1;
int ymax1;
int xmin2;
int xmax2;
int ymin2;
int ymax2;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int x1, y1, x2, y2, x3, y3, x4, y4;
  cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4;
  xmin1 = min(x1, min(x2, min(x3, x4))) * 2;
  xmax1 = max(x1, max(x2, max(x3, x4))) * 2;
  ymin1 = min(y1, min(y2, min(y3, y4))) * 2;
  ymax1 = max(y1, max(y2, max(y3, y4))) * 2;
  x1, y1, x2, y2, x3, y3, x4, y4;
  cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4;
  xmin2 = min(x1, min(x2, min(x3, x4))) * 2;
  xmax2 = max(x1, max(x2, max(x3, x4))) * 2;
  ymin2 = min(y1, min(y2, min(y3, y4))) * 2;
  ymax2 = max(y1, max(y2, max(y3, y4))) * 2;
  int cx = (xmin2 + xmax2) / 2;
  int cy = (ymin2 + ymax2) / 2;
  xmin1 -= cx;
  xmax1 -= cx;
  ymin1 -= cy;
  ymax1 -= cy;
  xmin2 -= cx;
  xmax2 -= cx;
  ymin2 -= cy;
  ymax2 -= cy;
  for (int i = -1000; i <= 1000; ++i) {
    for (int j = -1000; j <= 1000; ++j) {
      if (i >= xmin1 && i <= xmax1 && j >= ymin1 && j <= ymax1) {
        int ii = i - j;
        int jj = i + j;
        if (ii >= xmin2 && ii <= xmax2 && jj >= ymin2 && jj <= ymax2) {
          cout << "YES" << endl;
          return 0;
        }
      }
    }
  }
  cout << "NO" << endl;
}
