#include <bits/stdc++.h>
using namespace std;
int x[8], y[8];
map<pair<int, int>, int> mp;
bool ok() {
  int Min[2] = {(int)1e8, (int)1e8}, Max[2] = {(int)-1e8, (int)-1e8};
  for (int i = 4; i < 8; ++i) {
    Min[0] = min(Min[0], x[i]);
    Min[1] = min(Min[1], y[i]);
    Max[0] = max(Max[0], x[i]);
    Max[1] = max(Max[1], y[i]);
  }
  int h = (Max[1] - Min[1]) / 2;
  int mid = (Max[1] + Min[1]) / 2;
  for (int i = 0; i <= h; ++i)
    for (int j = Min[0] + i; j <= Max[0] - i; ++j)
      if (mp[pair<int, int>(j, mid + i)] || mp[pair<int, int>(j, mid - i)])
        return true;
  return false;
}
int main() {
  while (scanf("%d%d", x, y) != EOF) {
    for (int i = 1; i < 8; ++i) scanf("%d%d", x + i, y + i);
    int Min[2] = {(int)1e8, (int)1e8}, Max[2] = {(int)-1e8, (int)-1e8};
    for (int i = 0; i < 4; ++i) {
      Min[0] = min(Min[0], x[i]);
      Min[1] = min(Min[1], y[i]);
      Max[0] = max(Max[0], x[i]);
      Max[1] = max(Max[1], y[i]);
    }
    mp.clear();
    for (int i = Min[0]; i <= Max[0]; ++i)
      for (int j = Min[1]; j <= Max[1]; ++j) mp[pair<int, int>(i, j)] = 1;
    puts(ok() ? "YES" : "NO");
  }
  return 0;
}
