#include <bits/stdc++.h>
using namespace std;
struct point {
  int x;
  int y;
} sq[4], sp[4];
bool cmp(point a, point b) {
  if (a.x == b.x) return a.y < b.y;
  return a.x < b.x;
}
int t[220][220];
void tian(point a, point b) {
  for (int i = a.x; i <= b.x; ++i) {
    for (int j = a.y; j <= b.y; ++j) {
      t[i][j] = 1;
    }
  }
}
bool judge(point* sp) {
  for (int i = sp[0].x; i <= sp[1].x; ++i) {
    for (int j = 0; j <= i - sp[0].x; ++j) {
      if (t[i][sp[0].y + j] == 1 or t[i][sp[0].y - j] == 1) {
        return true;
      }
    }
  }
  for (int i = sp[1].x; i <= sp[3].x; ++i) {
    for (int j = 0; j <= sp[2].y - sp[0].y - (i - sp[1].x); ++j) {
      if (t[i][sp[0].y + j] == 1 or t[i][sp[0].y - j] == 1) {
        return true;
      }
    }
  }
  return false;
}
int main() {
  for (int i = 0; i < 4; ++i)
    cin >> sq[i].x >> sq[i].y, sq[i].x += 100, sq[i].y += 100;
  for (int i = 0; i < 4; ++i)
    cin >> sp[i].x >> sp[i].y, sp[i].x += 100, sp[i].y += 100;
  sort(sq, sq + 4, cmp);
  sort(sp, sp + 4, cmp);
  tian(sq[0], sq[3]);
  if (judge(sp))
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
