#include <bits/stdc++.h>
using namespace std;
int main() {
  double a[5], b[5], c[5], d[5];
  double min1, min2, min3, min4;
  min1 = min2 = min3 = min4 = INT_MAX;
  double max1, max2, max3, max4;
  max1 = max2 = max3 = max4 = INT_MIN;
  int i;
  for (i = 0; i < 4; i++) cin >> a[i] >> b[i];
  for (i = 0; i < 4; i++) cin >> c[i] >> d[i];
  a[4] = (a[0] + a[2]) / 2;
  b[4] = (b[0] + b[2]) / 2;
  c[4] = (c[0] + c[2]) / 2;
  d[4] = (d[0] + d[2]) / 2;
  for (i = 0; i < 4; i++) {
    max1 = max(max1, a[i]);
    min1 = min(min1, a[i]);
    max2 = max(max2, b[i]);
    min2 = min(min2, b[i]);
  }
  for (i = 0; i < 4; i++) {
    max3 = max(max3, c[i] + d[i]);
    min3 = min(min3, c[i] + d[i]);
    max4 = max(max4, c[i] - d[i]);
    min4 = min(min4, c[i] - d[i]);
  }
  bool valid = false;
  for (i = 0; i < 5; i++) {
    if (a[i] + b[i] <= max3 && a[i] + b[i] >= min3 && a[i] - b[i] <= max4 &&
        a[i] - b[i] >= min4) {
      valid = true;
      break;
    }
  }
  for (i = 0; i < 5; i++) {
    if (c[i] <= max1 && c[i] >= min1 && d[i] <= max2 && d[i] >= min2) {
      valid = true;
      break;
    }
  }
  if (valid)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
