#include <bits/stdc++.h>
using namespace std;
double x[8], y[8];
double m[8], n[8];
int t = 0;
double a, b;
int main() {
  for (int i = 0; i <= 3; i++) {
    cin >> x[i];
    cin >> y[i];
  }
  for (int i = 4; i <= 7; i++) {
    cin >> x[i];
    cin >> y[i];
  }
  double x1, y1, x2, y2;
  x1 = min(x[1], x[3]);
  y1 = min(y[1], y[3]);
  x2 = max(x[1], x[3]);
  y2 = max(y[1], y[3]);
  for (int i = 4; i <= 7; i++) {
    if ((x[i] >= x1) && (x[i] <= x2) && (y[i] >= y1) && (y[i] <= y2)) t = 1;
  }
  if (!t) {
    for (int i = 0; i <= 7; i++) {
      m[i] = x[i] - y[i];
      n[i] = x[i] + y[i];
    }
    double x1, y1, x2, y2;
    x1 = min(m[4], m[6]);
    y1 = min(n[4], n[6]);
    x2 = max(m[4], m[6]);
    y2 = max(n[4], n[6]);
    a = (m[1] + m[3]) / 2;
    b = (n[1] + n[3]) / 2;
    for (int i = 0; i <= 3; i++) {
      if ((m[i] >= x1) && (m[i] <= x2) && (n[i] >= y1) && (n[i] <= y2)) t = 1;
    }
    if ((a >= x1) && (a <= x2) && (b >= y1) && (b <= y2)) t = 1;
  }
  if (t)
    cout << "YES";
  else
    cout << "NO";
}
