#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int first[8];
  int minmx = 200;
  int minmy = 200;
  for (int i = 0; i < 8; i++) {
    cin >> first[i];
    if (i % 2 == 0) {
      minmx = min(minmx, first[i]);
    } else {
      minmy = min(minmy, first[i]);
    }
  }
  int second[8];
  for (int i = 0; i < 8; i++) {
    cin >> second[i];
  }
  int l_x1 = 200;
  int l_y1 = 200;
  int r_x1 = -200;
  int r_y1 = -200;
  for (int i = 0; i < 8; i++) {
    if (i % 2 == 0) {
      first[i] -= minmx;
      second[i] -= minmx;
    } else {
      first[i] -= minmy;
      second[i] -= minmy;
    }
  }
  for (int i = 0; i < 8; i++) {
    if (i % 2 == 0) {
      if (second[i] < l_x1) {
        l_x1 = second[i];
        l_y1 = second[i + 1];
      }
      if (second[i] > r_x1) {
        r_x1 = second[i];
        r_y1 = second[i + 1];
      }
    }
  }
  vector<pair<int, int> > sec_points;
  int d_l_y1 = l_y1;
  int d_r_y1 = r_y1;
  while (l_x1 != r_x1) {
    sec_points.push_back(make_pair(l_x1, l_y1));
    sec_points.push_back(make_pair(l_x1, d_l_y1));
    sec_points.push_back(make_pair(r_x1, l_y1));
    sec_points.push_back(make_pair(r_x1, d_l_y1));
    for (int j = min(l_y1, d_l_y1); j <= max(l_y1, d_l_y1); j++) {
      for (int p = 0; p < 8; p += 2) {
        if (first[p] == l_x1 && first[p + 1] == j) {
          cout << "YES";
          return 0;
        }
        if (first[p] == r_x1 && first[p + 1] == j) {
          cout << "YES";
          return 0;
        }
      }
    }
    l_x1++;
    r_x1--;
    l_y1++;
    d_l_y1--;
  }
  sec_points.push_back(make_pair(l_x1, l_y1));
  sec_points.push_back(make_pair(l_x1, d_l_y1));
  int x1 = -200;
  int y1 = -200;
  for (int i = 0; i < 8; i += 2) {
    int x = first[i];
    int y = first[i + 1];
    if (x > x1) {
      x1 = x;
    }
    if (y > y1) {
      y1 = y;
    }
  }
  for (pair<int, int> cur : sec_points) {
    for (int i = 0; i <= x1; i++) {
      for (int j = 0; j <= y1; j++) {
        if (cur.first == i && cur.second == j) {
          cout << "YES";
          return 0;
        }
      }
    }
  }
  cout << "NO";
  return 0;
}
