#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  vector<int> x1(4);
  vector<int> x2(4);
  vector<int> y1(4);
  vector<int> y2(4);
  for (int i = 0; i < 4; i++) cin >> x1[i] >> y1[i];
  for (int i = 0; i < 4; i++) cin >> x2[i] >> y2[i];
  sort(x1.begin(), x1.end());
  sort(x2.begin(), x2.end());
  sort(y1.begin(), y1.end());
  sort(y2.begin(), y2.end());
  for (int i = x1[0]; i <= x1[3]; i++) {
    for (int j = y1[0]; j <= y1[3]; j++) {
      if (i + j <= x2[3] + y2[2] && i + j >= x2[0] + y2[2] &&
          i - j >= x2[2] - y2[3] && i - j <= x2[3] - y2[2]) {
        cout << "YES";
        exit(0);
      }
    }
  }
  cout << "NO"
       << "\n";
}
