#include <bits/stdc++.h>
using namespace std;
struct loc {
  int line;
  int colum;
};
int M[208][208] = {0};
int main() {
  int a[8];
  int b[8];
  for (int i = 0; i < 8; i++) cin >> a[i];
  for (int i = 0; i < 8; i++) cin >> b[i];
  int line11 = 101, line12 = -101, colum11 = 101, colum12 = -101;
  int line21 = 101, line22 = -101, colum21 = 101, colum22 = -101;
  for (int i = 0; i < 8; i += 2)
    if (a[i] < line11) line11 = a[i];
  for (int i = 0; i < 8; i += 2)
    if (a[i] > line12) line12 = a[i];
  for (int i = 1; i < 8; i += 2)
    if (a[i] < colum11) colum11 = a[i];
  for (int i = 1; i < 8; i += 2)
    if (a[i] > colum12) colum12 = a[i];
  for (int i = 0; i < 8; i += 2)
    if (b[i] < line21) line21 = b[i];
  for (int i = 0; i < 8; i += 2)
    if (b[i] > line22) line22 = b[i];
  for (int i = 1; i < 8; i += 2)
    if (b[i] < colum21) colum21 = b[i];
  for (int i = 1; i < 8; i += 2)
    if (b[i] > colum22) colum22 = b[i];
  if (line11 < 0) {
    line12 -= line11;
    line21 -= line11;
    line22 -= line11;
    line11 = 0;
  }
  if (line21 < 0) {
    line11 -= line21;
    line22 -= line21;
    line12 -= line21;
    line21 = 0;
  }
  if (colum11 < 0) {
    colum12 -= colum11;
    colum22 -= colum11;
    colum21 -= colum11;
    colum11 = 0;
  }
  if (colum12 < 0) {
    colum22 -= colum12;
    colum21 -= colum12;
    colum11 -= colum12;
    colum12 = 0;
  }
  for (int i = line11; i <= line12; i++)
    for (int j = colum11; j <= colum12; j++) M[i][j] = 1;
  for (int i = line21; i <= (line21 + line22) / 2; i++)
    for (int j = (colum21 + colum22) / 2 - i + line21;
         j <= (colum21 + colum22) / 2 + i - line21; j++)
      if (M[i][j] == 1) {
        cout << "YES" << endl;
        return 0;
      }
  for (int i = (line21 + line22) / 2; i <= line22; i++)
    for (int j = (colum21 + colum22) / 2 - line22 + i;
         j <= (colum21 + colum22) / 2 + line22 - i; j++)
      if (M[i][j] == 1) {
        cout << "YES" << endl;
        return 0;
      }
  cout << "NO" << endl;
}
