#include <bits/stdc++.h>
using namespace std;
int xa[5];
int ya[5];
int xb[5];
int yb[5];
int main() {
  int minx1, miny1, maxx1, maxy1, minx2, miny2, maxx2, maxy2;
  for (int i = 0; i < 4; i++) {
    cin >> xa[i] >> ya[i];
  }
  minx1 = min(min(xa[0], xa[1]), min(xa[2], xa[3]));
  maxx1 = max(max(xa[0], xa[1]), max(xa[2], xa[3]));
  miny1 = min(min(ya[0], ya[1]), min(ya[2], ya[3]));
  maxy1 = max(max(ya[0], ya[1]), max(ya[2], ya[3]));
  for (int i = 0; i < 4; i++) {
    cin >> xb[i] >> yb[i];
    xa[i] = xb[i] + yb[i];
    ya[i] = xb[i] - yb[i];
  }
  minx2 = min(min(xa[0], xa[1]), min(xa[2], xa[3]));
  maxx2 = max(max(xa[0], xa[1]), max(xa[2], xa[3]));
  miny2 = min(min(ya[0], ya[1]), min(ya[2], ya[3]));
  maxy2 = max(max(ya[0], ya[1]), max(ya[2], ya[3]));
  for (int i = -100; i <= 100; i++) {
    for (int j = -100; j <= 100; j++) {
      if (minx1 <= i && i <= maxx1 && miny1 <= j && j <= maxy1 &&
          minx2 <= i + j && maxx2 >= i + j && miny2 <= i - j &&
          maxy2 >= i - j) {
        cout << "YES" << endl;
        return 0;
      }
    }
  }
  cout << "NO" << endl;
}
