#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<pair<int, int> > vect, sq1, sq2;
  int x, y;
  for (int i = 0; i < 4; i++) {
    cin >> x >> y;
    vect.push_back(make_pair(x, y));
  }
  sort(vect.begin(), vect.end());
  int minx = vect[0].first;
  int miny = vect[0].second;
  int maxx = vect[3].first;
  int maxy = vect[3].second;
  for (int i = minx; i <= maxx; i++) {
    for (int j = miny; j <= maxy; j++) {
      sq1.push_back(make_pair(i, j));
    }
  }
  vect.clear();
  for (int i = 0; i < 4; i++) {
    cin >> x >> y;
    vect.push_back(make_pair(x, y));
  }
  sort(vect.begin(), vect.end());
  minx = vect[0].first;
  miny = vect[1].second;
  maxx = vect[3].first;
  maxy = vect[2].second;
  int sty = vect[0].second;
  int revx = vect[1].first;
  int dev = 0;
  for (int i = minx; i <= maxx; i++) {
    sq2.push_back(make_pair(i, sty));
    for (int j = 1; j <= dev; j++) {
      sq2.push_back(make_pair(i, sty + j));
      sq2.push_back(make_pair(i, sty - j));
    }
    if (i < revx) {
      dev++;
    } else {
      dev--;
    }
  }
  for (int i = 0; i < sq1.size(); i++) {
    for (int j = 0; j < sq2.size(); j++) {
      if (sq1[i].first == sq2[j].first && sq1[i].second == sq2[j].second) {
        cout << "YES";
        return 0;
      }
    }
  }
  cout << "NO";
  return 0;
}
