#include <bits/stdc++.h>
using namespace std;
using s_t = short;
using u_t = unsigned;
using uc_t = unsigned char;
using ul_t = unsigned long;
using us_t = unsigned short;
using ull_t = unsigned long long;
using l_t = long;
using ll_t = long long;
using ld_t = long double;
template <typename T>
using ve = std::vector<T>;
template <typename T>
using mat = std::vector<std::vector<T>>;
using mi_t = std::vector<std::vector<int>>;
using ms_t = std::vector<std::vector<s_t>>;
using mb_t = std::vector<std::vector<bool>>;
using mus_t = std::vector<std::vector<us_t>>;
signed main() {
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(nullptr);
  std::cout.tie(nullptr);
  int xmn1 = INT_MAX, xmx1 = INT_MIN, ymn1 = INT_MAX, ymx1 = INT_MIN;
  for (int i = 0; i < 4; ++i) {
    int x{}, y{};
    cin >> x >> y;
    xmn1 = min(xmn1, x);
    xmx1 = max(xmx1, x);
    ymn1 = min(ymn1, y);
    ymx1 = max(ymx1, y);
  }
  int xmn2 = INT_MAX, xmx2 = INT_MIN, ymn2 = INT_MAX, ymx2 = INT_MIN;
  for (int i = 0; i < 4; ++i) {
    int x{}, y{};
    cin >> x >> y;
    xmn2 = min(xmn2, x);
    xmx2 = max(xmx2, x);
    ymn2 = min(ymn2, y);
    ymx2 = max(ymx2, y);
  }
  int mid = (xmn2 + xmx2) / 2;
  if ((xmn1 > xmx2 || xmx1 < xmn2 || ymn1 > ymx2 || ymx1 < ymn2) ||
      ((ymn2 > mid + ymx1 - xmn1 || ymn2 > -mid + ymx1 + xmx1) ||
       (ymx2 < -mid + ymn1 + xmn1 || ymx2 < mid + ymn1 - xmx1)))
    cout << "NO";
  else
    cout << "YES";
close:
  return 0;
}
