#include <bits/stdc++.h>
using namespace std;
const int INF = 0x7FFFFFFF;
struct prioritycom {
  bool operator()(const int& l, const int& r) { return l < r; }
};
template <typename T>
T lcm(T a, T b) {
  return a / __gcd(a, b) * b;
}
template <class T>
inline T bigmod(T p, T e, T M) {
  T ret = 1;
  for (; e > 0; e >>= 1) {
    if (e & 1) ret = (ret * p) % M;
    p = (p * p) % M;
  }
  return (T)ret;
}
template <class string>
long long int strton(string s) {
  long long int won;
  stringstream ss;
  ss << s;
  ss >> won;
  return won;
}
template <class T>
string ntostr(T n) {
  stringstream ss;
  ss << n;
  return ss.str();
}
template <class T>
inline T mod(T n, T m) {
  return (n % m + m) % m;
}
template <class T>
bool isprime(T n) {
  if (n % 2 == 0) {
    if (n == 2)
      return true;
    else
      return false;
  }
  T m = sqrt(n);
  for (T i = 3; i <= m; i += 2) {
    if (n % i == 0) return false;
  }
  return true;
}
bool isvowel(char ch) {
  ch = toupper(ch);
  if (ch == 'A' || ch == 'U' || ch == 'I' || ch == 'O' || ch == 'E')
    return true;
  return false;
}
double triangle_area1(double a, double b, double c) {
  double s = (a + b + c) * 0.5;
  return sqrt(s * (s - a) * (s - b) * (s - c));
}
double triangle_area2(double x1, double y1, double x2, double y2, double x3,
                      double y3) {
  return 0.5 * abs(x1 * y2 + x2 * y3 + x3 * y1 - x2 * y1 - x3 * y2 - x1 * y3);
}
double circle_area(double r, double theta) {
  return (theta * (2 * acos(0)) * r * r) / (2 * (2 * acos(0)));
}
double quad_area(double x1, double y1, double x2, double y2, double x3,
                 double y3, double x4, double y4) {
  return 0.5 * abs(x1 * y2 + x2 * y3 + x3 * y4 + x4 * y1 - x2 * y1 - x3 * y2 -
                   x4 * y3 - x1 * y4);
}
double cosangle(double a, double b, double c) {
  return acos((double)(b * b + c * c - a * a) / (double)(2 * b * c));
}
long long int Set(long long int N, long long int pos) {
  return N = N | (1ll << pos);
}
long long int reset(long long int N, long long int pos) {
  return N = N & ~(1ll << pos);
}
bool check(long long int N, long long int pos) {
  return (bool)(N & (1ll << pos));
}
long long int dx[] = {-1, 0, 1, 0};
long long int dy[] = {0, 1, 0, -1};
struct {
  long long int x, y;
} a[5], b[5];
long long int vis[205][205], cnt[205][205];
long long int axmn = 200, axmx = 0, aymn = 200, aymx = 0, bxmn = 200, bxmx = 0,
              bymn = 200, bymx = 0;
void f1(long long int xx, long long int yy) {
  cnt[xx][yy]++;
  vis[xx][yy] = 1;
  for (long long int i = 0; i < 4; i++) {
    if (xx + dx[i] >= axmn && xx + dx[i] <= axmx && yy + dy[i] >= aymn &&
        yy + dy[i] <= aymx && !vis[xx + dx[i]][yy + dy[i]])
      f1(xx + dx[i], yy + dy[i]);
  }
}
void f2(long long int xx, long long int yy) {
  vis[xx][yy] = 1;
  cnt[xx][yy]++;
  for (long long int i = 0; i < 4; i++) {
    if (abs(xx - b[i].x) == abs(yy - b[i].y)) return;
  }
  for (long long int i = 0; i < 4; i++) {
    if (!vis[xx + dx[i]][yy + dy[i]]) f2(xx + dx[i], yy + dy[i]);
  }
}
int main() {
  for (long long int i = 0; i < 4; i++) {
    scanf("%lld%lld", &a[i].x, &a[i].y);
    a[i].x += 100, a[i].y += 100;
    axmn = min(a[i].x, axmn);
    axmx = max(a[i].x, axmx);
    aymn = min(a[i].y, aymn);
    aymx = max(a[i].y, aymx);
  }
  for (long long int i = 0; i < 4; i++) {
    scanf("%lld%lld", &b[i].x, &b[i].y);
    b[i].x += 100, b[i].y += 100;
    bxmn = min(b[i].x, bxmn);
    bxmx = max(b[i].x, bxmx);
    bymn = min(b[i].y, bymn);
    bymx = max(b[i].y, bymx);
  }
  f2((bxmn + bxmx) / 2, (bymn + bymx) / 2);
  memset(vis, 0, sizeof(vis));
  f1(a[0].x, a[0].y);
  for (long long int i = 0; i <= 200; i++) {
    for (long long int j = 0; j <= 200; j++) {
      if (cnt[i][j] > 1) {
        cout << "YES";
        printf("\n");
        return 0;
      }
    }
  }
  cout << "NO";
  printf("\n");
}
