#include <bits/stdc++.h>
using namespace std;
ostream cnull(NULL);
template <class TH>
void _dbg(const char *sdbg, TH h) {
  cnull << sdbg << "=" << h << "\n";
}
template <class TH, class... TA>
void _dbg(const char *sdbg, TH h, TA... a) {
  while (*sdbg != ',') cnull << *sdbg++;
  cnull << "=" << h << ",";
  _dbg(sdbg + 1, a...);
}
const int INF = 1e9 + 7;
int32_t main() {
  int mx = INF, MX = -INF, my = INF, MY = -INF;
  for (int i = 0; i < 4; ++i) {
    int a, b;
    scanf("%d%d", &a, &b);
    mx = min(mx, a);
    my = min(my, b);
    MX = max(MX, a);
    MY = max(MY, b);
  }
  int LX = INF, PX = -INF, DY = INF, GY = -INF;
  for (int i = 0; i < 4; ++i) {
    int a, b;
    scanf("%d%d", &a, &b);
    LX = min(LX, a);
    DY = min(DY, b);
    PX = max(PX, a);
    GY = max(GY, b);
  }
  int srodek = (LX + PX) / 2;
  bool b = 0;
  for (int i = DY; i <= GY; ++i) {
    int co = min(i - DY, GY - i);
    for (int j = srodek - co; j <= srodek + co; ++j) {
      if (i >= my && i <= MY && j >= mx && j <= MX) b = 1;
    }
  }
  puts(b ? "YES" : "NO");
}
