#include <bits/stdc++.h>
double const EPS = 3e-8;
using namespace std;
template <class T>
T gcd(T a, T b) {
  return (b != 0 ? gcd<T>(b, a % b) : a);
}
template <class T>
T lcm(T a, T b) {
  return (a / gcd<T>(a, b) * b);
}
struct debugger {
  template <typename T>
  debugger& operator,(const T& v) {
    cerr << v << "\t";
    return *this;
  }
} dbg;
template <class A, class B>
ostream& operator<<(ostream& o, const pair<A, B>& p) {
  return o << "(" << p.first << ", " << p.second << ")";
}
template <class T>
ostream& operator<<(ostream& o, const vector<T>& v) {
  o << "[";
  for (__typeof((v).end()) it = (v).begin(); it != (v).end(); ++it)
    o << *it << ", ";
  return o << "]";
}
template <class T>
ostream& operator<<(ostream& o, const set<T>& v) {
  o << "[";
  for (__typeof((v).end()) it = (v).begin(); it != (v).end(); ++it)
    o << *it << ", ";
  return o << "]";
}
template <class T>
inline bool read(T& x) {
  int c = getchar();
  int sgn = 1;
  while (~c && c < '0' || c > '9') {
    if (c == '-') sgn = -1;
    c = getchar();
  }
  for (x = 0; ~c && '0' <= c && c <= '9'; c = getchar()) x = x * 10 + c - '0';
  x *= sgn;
  return ~c;
}
const int NX = 1005;
int present[NX][NX];
vector<pair<int, int> > squareA, squareB;
pair<pair<int, int>, pair<int, int> > input() {
  int lowX = 0, lowY = 0, highX = 0, highY;
  for (__typeof((4) - 1) i = (0); i <= (4) - 1; ++i) {
    int x = ({
      int a;
      read(a);
      a;
    }),
        y = ({
          int a;
          read(a);
          a;
        });
    if (i) {
      lowX = min(lowX, x);
      highX = max(highX, x);
      lowY = min(lowY, y);
      highY = max(highY, y);
    } else {
      lowX = highX = x;
      lowY = highY = y;
    }
  }
  pair<int, int> X = make_pair(lowX, highX);
  pair<int, int> Y = make_pair(lowY, highY);
  return make_pair(X, Y);
}
bool solve() {
  pair<pair<int, int>, pair<int, int> > received = input();
  int lowX = received.first.first;
  int highX = received.first.second;
  int lowY = received.second.first;
  int highY = received.second.second;
  for (int i = lowX + 105; i <= highX + 105; i++) {
    for (int j = lowY + 105; j <= highY + 105; j++) {
      present[i][j] = 1;
    }
  }
  received = input();
  lowX = received.first.first;
  highX = received.first.second;
  lowY = received.second.first;
  highY = received.second.second;
  for (int i = lowX + 105; i <= highX + 105; i++) {
    for (int j = lowY + 105; j <= highY + 105; j++) {
      int middleAdd = (highX + 105) - (lowX + 105);
      middleAdd /= 2;
      int middleX = lowX + middleAdd + 105;
      int diffX = abs(middleX - i);
      int low = lowY + 105;
      int high = highY + 105;
      if (j - low >= diffX && high - j >= diffX) {
        if (present[i][j]) return true;
      }
    }
  }
  return false;
}
int main() {
  int t = 1;
  while (t--) puts(solve() ? "YES" : "NO");
  return 0;
}
