#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e3 + 100;
int x[2][4];
int y[2][4];
bool check1(int cx, int cy) {
  int XMax = INT_MIN;
  int XMin = INT_MAX;
  int YMax = INT_MIN;
  int YMin = INT_MAX;
  for (int i = 0; i <= 3; i++) {
    XMax = max(XMax, x[0][i]);
    XMin = min(XMin, x[0][i]);
    YMax = max(YMax, y[0][i]);
    YMin = min(YMin, y[0][i]);
  }
  return (cx >= XMin and cx <= XMax and cy >= YMin and cy <= YMax);
}
bool check2(int cx, int cy) {
  int m1;
  if ((y[1][1] - y[1][0]) == (x[1][1] - x[1][0]))
    m1 = 1;
  else
    m1 = -1;
  int start = x[1][0], end = y[1][0];
  int start1 = start, end1 = end;
  int distance = x[1][1] - x[1][0];
  int cnt1 = 0;
  while (1) {
    start = start1;
    end = end1;
    if (m1 == 1) {
      start1--;
      end1++;
    } else {
      start1++;
      end1++;
    }
    int cnt = 0;
    while (1) {
      if (start == cx and end == cy) return 1;
      if (cnt == distance) break;
      if (m1 == 1) {
        start++;
        end++;
      } else {
        start++;
        end--;
      }
      cnt++;
    }
    if (cnt1 == distance) break;
    cnt1++;
  }
  return 0;
}
void solve() {
  for (int i = 0; i <= 3; i++) {
    scanf("%d", &x[0][i]);
    scanf("%d", &y[0][i]);
  }
  for (int i = 0; i <= 3; i++) {
    scanf("%d", &x[1][i]);
    scanf("%d", &y[1][i]);
  }
  if (x[1][0] > x[1][1]) {
    swap(x[1][0], x[1][1]);
    swap(y[1][0], y[1][1]);
    swap(x[1][2], x[1][3]);
    swap(y[1][2], y[1][3]);
  }
  if (y[1][0] > y[1][3]) {
    swap(x[1][0], x[1][3]);
    swap(y[1][0], y[1][3]);
    swap(x[1][1], x[1][2]);
    swap(y[1][1], y[1][2]);
  }
  for (int i = 0; i <= 200; i++) {
    for (int j = 0; j <= 200; j++) {
      int cnt = 0;
      int x1 = i;
      int y1 = j;
      if (x1 > 100) {
        x1 = 100 - x1;
      }
      if (y1 > 100) {
        y1 = 100 - y1;
      }
      if (check1(x1, y1)) cnt++;
      if (check2(x1, y1)) cnt++;
      if (cnt == 2) {
        puts("YES");
        return;
      }
    }
  }
  puts("NO");
}
int main() {
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
