#include <bits/stdc++.h>
using namespace std;
struct node {
  int x, y;
} a[5], b[5];
int d1;
int d2;
int c[220][220];
int minxB = 101010, minyB = 101010;
int maxxB = -101010, maxyB = -101010;
int minxA = 101010, minyA = 101010;
int maxxA = -101010, maxyA = -101010;
int isIN(int x, int y, int d1, int d2) {
  return abs(x * d1 / 2) + abs(y * d2 / 2) - (d1 * d2) / 4;
}
bool dry(int x, int y) {
  if (isIN(x - ((minxB + maxxB) / 2), y - ((minyB + maxyB) / 2), d1, d2) <= 0)
    return true;
  else
    return false;
}
int main() {
  for (int i = 0; i < 4; ++i) {
    cin >> a[i].x >> a[i].y;
    if (a[i].x < minxA) minxA = a[i].x;
    if (a[i].x > maxxA) maxxA = a[i].x;
    if (a[i].y < minyA) minyA = a[i].y;
    if (a[i].y > maxyA) maxyA = a[i].y;
  }
  for (int i = 0; i < 4; ++i) {
    cin >> b[i].x >> b[i].y;
    if (b[i].x < minxB) minxB = b[i].x;
    if (b[i].x > maxxB) maxxB = b[i].x;
    if (b[i].y < minyB) minyB = b[i].y;
    if (b[i].y > maxyB) maxyB = b[i].y;
  }
  d1 = maxxB - minxB;
  d2 = maxyB - minyB;
  for (int i = minxA; i <= maxxA; ++i) {
    for (int j = maxyA; j >= minyA; --j) {
      if (dry(i, j)) return cout << "YES\n", 0;
    }
  }
  cout << "NO\n";
  return 0;
}
