#include <bits/stdc++.h>
using namespace std;
const long long INF = 0x3f3f3f3f;
struct node {
  int x, y;
};
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  node p1[4], p2[4];
  int mx_x1 = -INF, mx_x2 = -INF, mx_y1 = -INF, mx_y2 = -INF;
  int mn_x1 = INF, mn_x2 = INF, mn_y1 = INF, mn_y2 = INF;
  for (int i = 0; i < 4; i++) {
    cin >> p1[i].x >> p1[i].y;
    mx_x1 = max(mx_x1, p1[i].x);
    mn_x1 = min(mn_x1, p1[i].x);
    mx_y1 = max(mx_y1, p1[i].y);
    mn_y1 = min(mn_y1, p1[i].y);
  }
  for (int i = 0; i < 4; i++) {
    cin >> p2[i].x >> p2[i].y;
    mx_x2 = max(mx_x2, p2[i].x);
    mn_x2 = min(mn_x2, p2[i].x);
    mx_y2 = max(mx_y2, p2[i].y);
    mn_y2 = min(mn_y2, p2[i].y);
  }
  if (mx_x1 < mn_x2 || mn_x1 > mx_x2 || mx_y1 < mn_y2 || mn_y1 > mx_y2) {
    cout << "NO" << endl;
    return 0;
  }
  int h, w;
  h = min(abs(mx_x1 - mn_x2), abs(mn_x1 - mx_x2));
  w = min(abs(mx_y1 - mn_y2), abs(mn_y1 - mx_y2));
  if ((h + w) * 2 >= abs(mx_x2 - mn_x2))
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
