#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[2][4], b[2][4];
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 2; j++) {
      cin >> a[j][i];
    }
  }
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 2; j++) {
      cin >> b[j][i];
    }
  }
  int A[300][300], B[300][300];
  int a_key00 = 300, a_key01 = -300, a_key10 = 300, a_key11 = -300;
  int b_key00 = 300, b_key01 = -300, b_key10 = 300, b_key11 = -300;
  for (int i = 0; i < 4; i++) {
    a_key00 = min(a_key00, a[0][i]);
    b_key00 = min(b_key00, b[0][i] + b[1][i]);
    a_key01 = max(a_key01, a[0][i]);
    b_key01 = max(b_key01, b[0][i] + b[1][i]);
    a_key10 = min(a_key10, a[1][i]);
    b_key10 = min(b_key10, b[0][i] - b[1][i]);
    a_key11 = max(a_key11, a[1][i]);
    b_key11 = max(b_key11, b[0][i] - b[1][i]);
  }
  for (int i = -100; i <= 100; i++) {
    for (int j = -100; j <= 100; j++) {
      if (i >= a_key00 && i <= a_key01 && j >= a_key10 && j <= a_key11) {
        A[i + 100][j + 100] = 1;
      } else {
        A[i + 100][j + 100] = 0;
      }
      if (i + j >= b_key00 && i + j <= b_key01 && i - j >= b_key10 &&
          i - j <= b_key11) {
        B[i + 100][j + 100] = 1;
      } else {
        B[i + 100][j + 100] = 0;
      }
    }
  }
  for (int i = -100; i <= 100; i++) {
    for (int j = -100; j <= 100; j++) {
      if (A[i + 100][j + 100] == 1 && B[i + 100][j + 100] == 1) {
        cout << ("YES") << "\n";
        return 0;
      }
    }
  }
  cout << ("NO") << "\n";
}
