#include <bits/stdc++.h>
using namespace std;
template <typename T>
std::ostream &operator<<(std::ostream &out, vector<T> &v) {
  for (typename vector<T>::size_type i = 0; i < v.size(); ++i)
    out << v[i] << " ";
  out << "\n";
  return out;
}
template <typename T>
std::ostream &operator<<(std::ostream &out, set<T> &s) {
  for (auto e : s) out << e << " ";
  out << "\n";
  return out;
}
template <typename T, typename N>
std::ostream &operator<<(std::ostream &out, pair<T, N> &p) {
  out << "(" << p.first << ", " << p.second << ") ";
  return out;
}
template <typename T, typename N>
std::ostream &operator<<(std::ostream &out, vector<pair<T, N> > &v) {
  for (size_t i = 0; i < v.size(); ++i) cout << v[i];
  out << "\n";
  return out;
}
template <typename T>
std::ostream &operator<<(std::ostream &out, vector<vector<T> > &v) {
  for (size_t i = 0; i < v.size(); ++i) {
    for (size_t j = 0; j < v[i].size(); ++j) {
      out << v[i][j] << " ";
    }
    out << "\n";
  }
  return out;
}
template <typename T>
std::ostream &operator<<(std::ostream &out, vector<set<T> > &v) {
  for (size_t i = 0; i < v.size(); ++i) {
    out << v[i];
  }
  out << "\n";
  return out;
}
bool inside(double x, double y, pair<int, int> upper_right,
            pair<int, int> lower_left) {
  if (1.0 * lower_left.first <= x && x <= 1.0 * upper_right.first &&
      1.0 * lower_left.second <= y && y <= 1.0 * upper_right.second) {
    return true;
  }
  return false;
}
bool check(vector<pair<int, int> > s1_points,
           vector<pair<int, int> > s2_points) {
  pair<int, int> s1_upper_right = {-200, -200}, s1_lower_left = {200, 200};
  pair<int, int> s2_upper = {-200, -200}, s2_lower = {200, 200};
  for (int i = 0; i < 4; ++i) {
    int x = s1_points[i].first;
    int y = s1_points[i].second;
    if (x >= s1_upper_right.first && y >= s1_upper_right.second) {
      s1_upper_right = {x, y};
    }
    if (x <= s1_lower_left.first && y <= s1_lower_left.second) {
      s1_lower_left = {x, y};
    }
  }
  for (int i = 0; i < 4; ++i) {
    int x = s2_points[i].first;
    int y = s2_points[i].second;
    if (y > s2_upper.second) {
      s2_upper = {x, y};
    }
    if (y < s2_lower.second) {
      s2_lower = {x, y};
    }
  }
  for (int i = 0; i < 4; ++i) {
    if (inside(s2_points[i].first, s2_points[i].second, s1_upper_right,
               s1_lower_left)) {
      return true;
    }
  }
  int mid_x = s2_lower.first;
  double mid_y = (double)(s2_upper.second + s2_lower.second) / 2;
  if (inside(mid_x, mid_y, s1_upper_right, s1_lower_left)) {
    return true;
  }
  return false;
}
void solve() {
  vector<pair<int, int> > s1_points(4), s2_points(4);
  int x, y;
  for (int i = 0; i < 4; ++i) {
    cin >> x >> y;
    s1_points[i] = {x, y};
  }
  for (int i = 0; i < 4; ++i) {
    cin >> x >> y;
    s2_points[i] = {x, y};
  }
  if (check(s1_points, s2_points)) {
    cout << "YES\n";
    return;
  }
  for (int i = 0; i < 4; ++i) {
    int x = s1_points[i].first + s1_points[i].second;
    int y = s1_points[i].first - s1_points[i].second;
    s1_points[i] = {x, y};
  }
  for (int i = 0; i < 4; ++i) {
    int x = s2_points[i].first + s2_points[i].second;
    int y = s2_points[i].first - s2_points[i].second;
    s2_points[i] = {x, y};
  }
  if (check(s2_points, s1_points)) {
    cout << "YES\n";
    return;
  }
  cout << "NO\n";
  return;
}
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t;
  t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
