#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > arr(4), brr(4);
bool eq1(int i, int j) {
  int y = i + brr[2].second - brr[2].first;
  if (j - y > 0) return false;
  return true;
}
bool eq2(int i, int j) {
  int y = -i + brr[2].second + brr[2].first;
  if (j - y <= 0) return true;
  return false;
}
bool eq3(int i, int j) {
  int y = i + brr[3].second - brr[3].first;
  if (j - y >= 0) return true;
  return false;
}
bool eq4(int i, int j) {
  int y = -i + brr[0].first + brr[0].second;
  if (j - y >= 0) return true;
  return false;
}
bool check(int i, int j) {
  bool a = eq1(i, j);
  bool b = eq2(i, j);
  bool c = eq3(i, j);
  bool d = eq4(i, j);
  return a && b && c && d;
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  for (auto &it : arr) cin >> it.first >> it.second;
  for (auto &it : brr) cin >> it.first >> it.second;
  sort((brr).begin(), (brr).end());
  int min_x = INT_MAX, max_x = INT_MIN, min_y = INT_MAX, max_y = INT_MIN;
  for (auto &it : arr)
    min_x = min(min_x, it.first), max_x = max(max_x, it.first),
    min_y = min(min_y, it.second), max_y = max(max_y, it.second);
  bool flag = 0;
  for (int i = min_x; i <= max_x; i++) {
    for (int j = min_y; j <= max_y; j++) {
      flag |= check(i, j);
    }
  }
  if (flag)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
