#include <bits/stdc++.h>
inline int sbt(int x) { return __builtin_popcount(x); }
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cout << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cout.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
struct pt {
  int x;
  int y;
};
pt a1[6], a2[6];
int arr[254][254];
bool cmp(pt a, pt b) { return a.x < b.x; }
bool cmpy(pt a, pt b) { return a.y < b.y; }
int main() {
  cin.sync_with_stdio(false);
  cout.sync_with_stdio(false);
  for (int i = 0; i <= 3; i++) cin >> a1[i].x >> a1[i].y;
  for (int i = 0; i <= 3; i++) cin >> a2[i].x >> a2[i].y;
  sort(a1, a1 + 4, cmp);
  int stx = a1[0].x;
  int endx = a1[3].x;
  sort(a1, a1 + 4, cmpy);
  int sty = a1[0].y;
  int endy = a1[3].y;
  for (int i = stx; i <= endx; i++) {
    for (int j = sty; j <= endy; j++) {
      arr[i + 125][j + 125]++;
    }
  }
  sort(a2, a2 + 4, cmp);
  stx = a2[0].x;
  endx = a2[3].x;
  int tmpx = a2[1].x;
  sort(a2, a2 + 4, cmpy);
  sty = a2[0].y;
  endy = a2[3].y;
  int tmpy = a2[1].y;
  int xx, yy;
  for (int i = -100; i <= 100; i++) {
    for (int j = -100; j <= 100; j++) {
      if ((i - j) >= (stx - tmpy) && (i - j) <= (endx - tmpy) &&
          (i + j) >= (stx + tmpy) && (i + j) <= (endx + tmpy)) {
        arr[i + 125][j + 125]++;
      }
    }
  }
  for (int i = 0; i < 251; i++) {
    for (int j = 0; j < 251; j++) {
      if (arr[i][j] == 2) {
        cout << "YES";
        return 0;
      }
    }
  }
  cout << "NO";
  return 0;
}
