#include <bits/stdc++.h>
using namespace std;
double p1[8] = {0}, p2[8] = {0};
int main() {
  while (cin >> p1[0]) {
    double up = -105, up2 = -105, down = 105, down2 = 105, left = 105,
           left2 = 105, right = -105, right2 = -105;
    for (int i = 1; i < 8; i++) {
      cin >> p1[i];
    }
    for (int i = 0; i < 8; i++) {
      cin >> p2[i];
    }
    for (int i = 0, j = 1; i < 8 && j < 8; i += 2, j += 2) {
      if (left > p1[i]) left = p1[i];
      if (right < p1[i]) right = p1[i];
      if (up < p1[j]) up = p1[j];
      if (down > p1[j]) down = p1[j];
      if (left2 > p2[i]) left2 = p2[i];
      if (right2 < p2[i]) right2 = p2[i];
      if (up2 < p2[j]) up2 = p2[j];
      if (down2 > p2[j]) down2 = p2[j];
    }
    if (left2 > right || right2 < left || up2 < down || down2 > up) {
      cout << "NO" << endl;
    } else if ((up2 + down2) / 2 > up && (right2 + left2) / 2 > right) {
      if (right + up < left2 + (up2 + down2) / 2)
        cout << "NO" << endl;
      else
        cout << "YES" << endl;
    } else if ((up2 + down2) / 2 < down && (right2 + left2) / 2 > right) {
      if (down - right > (up2 + down2) / 2 - left2)
        cout << "NO" << endl;
      else
        cout << "YES" << endl;
    } else if ((up2 + down2) / 2 > up && (right2 + left2) / 2 < left) {
      if (up - left < (up2 + down2) / 2 - right2)
        cout << "NO" << endl;
      else
        cout << "YES" << endl;
    } else if ((up2 + down2) / 2 < down && (right2 + left2) / 2 < left) {
      if (left + down > right2 + (up2 + down2) / 2)
        cout << "NO" << endl;
      else
        cout << "YES" << endl;
    } else
      cout << "YES" << endl;
  }
  return 0;
}
