#include <bits/stdc++.h>
using namespace std;
int c[555][555];
int main() {
  vector<pair<int, int> > a;
  for (int i = 0; i < 4; i++) {
    int x, y;
    cin >> x >> y;
    x += 101;
    y += 101;
    x *= 2;
    y *= 2;
    a.push_back({x, y});
  }
  sort(a.begin(), a.end());
  for (int i = a[0].first; i <= a[2].first; i++)
    for (int j = a[0].second; j <= a[1].second; j++) c[i][j]++;
  vector<pair<int, int> > b;
  for (int i = 0; i < 4; i++) {
    int x, y;
    cin >> x >> y;
    x += 101;
    y += 101;
    x *= 2;
    y *= 2;
    b.push_back({x, y});
  }
  sort(b.begin(), b.end());
  int xx = b[0].first;
  int j = b[1].second;
  for (int i = b[1].first; i <= b[3].first; i++) {
    int x = i;
    int y = j;
    while (x >= xx) {
      c[x][y]++;
      x--;
      y++;
    }
    j++;
    xx++;
  }
  for (int i = 0; i < 555; i++)
    for (int j = 0; j < 555; j++)
      if (c[i][j] > 1) {
        cout << "YES" << endl;
        return 0;
      }
  cout << "NO" << endl;
  return 0;
}
