#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-9;
const double pi = acos(-1);
int dx[] = {0, 0, 1, -1, 1, 1, -1, -1};
int dy[] = {1, -1, 0, 0, -1, 1, 1, -1};
const int N = 400;
int v[N][N];
void ex(int x1, int y1, int x2, int y2, int d) {
  int i = x1, j = y1;
  i += dx[d], j += dy[d];
  while (i != x2 && j != y2) {
    v[i][j]++;
    i += dx[d], j += dy[d];
  }
}
int main() {
  pair<int, int> f[4];
  for (int i = 0; i < 4; ++i) {
    cin >> f[i].first >> f[i].second;
    f[i].first += 100;
    f[i].second += 100;
  }
  sort(f, f + 4);
  pair<int, int> s[4];
  for (int i = 0; i < 4; ++i) {
    cin >> s[i].first >> s[i].second;
    s[i].first += 100;
    s[i].second += 100;
    v[s[i].first][s[i].second]++;
  }
  for (int i = 0; i < 4; ++i) {
    if (s[i].first < s[(i + 1) % 4].first &&
        s[i].second < s[(i + 1) % 4].second)
      ex(s[i].first, s[i].second, s[(i + 1) % 4].first, s[(i + 1) % 4].second,
         5);
    if (s[i].first > s[(i + 1) % 4].first &&
        s[i].second > s[(i + 1) % 4].second)
      ex(s[i].first, s[i].second, s[(i + 1) % 4].first, s[(i + 1) % 4].second,
         7);
    if (s[i].first < s[(i + 1) % 4].first &&
        s[i].second > s[(i + 1) % 4].second)
      ex(s[i].first, s[i].second, s[(i + 1) % 4].first, s[(i + 1) % 4].second,
         4);
    if (s[i].first > s[(i + 1) % 4].first &&
        s[i].second < s[(i + 1) % 4].second)
      ex(s[i].first, s[i].second, s[(i + 1) % 4].first, s[(i + 1) % 4].second,
         6);
  }
  for (int i = 0; i < N; ++i) {
    int beg = -1, en = -1;
    for (int j = 0; j < N; ++j) {
      if (v[i][j]) {
        if (~beg)
          en = j;
        else
          beg = j;
      }
    }
    if (~beg && ~en) {
      for (int j = beg + 1; j < en; ++j) v[i][j] = 1;
    }
  }
  for (int i = f[0].first; i <= f[3].first; ++i) {
    for (int j = f[0].second; j <= f[3].second; ++j) v[i][j]++;
  }
  for (int i = 0; i < N; ++i) {
    for (int j = 0; j < N; ++j) {
      if (v[i][j] > 1) {
        puts("YES");
        return 0;
      }
    }
  }
  puts("NO");
}
