#include <bits/stdc++.h>
using namespace std;
const int N = 300;
struct Point {
  int x, y;
  bool operator<(const Point& b) const {
    if (x == b.x) return y < b.y;
    return x < b.x;
  }
} p[100];
bool vis[N][N];
int main() {
  for (int i = 1; i <= 8; ++i) {
    scanf("%d %d", &p[i].x, &p[i].y);
    p[i].x += 100;
    p[i].y += 100;
  }
  sort(p + 1, p + 5);
  sort(p + 5, p + 9);
  for (int i = p[1].x; i <= p[4].x; ++i) {
    for (int j = p[1].y; j <= p[4].y; ++j) {
      vis[i][j] = 1;
    }
  }
  for (int i = 0; i <= p[6].x - p[5].x; ++i) {
    for (int j = 0; j <= i; ++j) {
      if (vis[p[5].x + i][p[5].y + j] || vis[p[5].x + i][p[5].y - j]) {
        puts("YES");
        return 0;
      }
    }
  }
  for (int i = 0; i <= p[8].x - p[6].x; ++i) {
    for (int j = 0; j <= i; ++j) {
      if (vis[p[8].x - i][p[8].y + j] || vis[p[8].x - i][p[8].y - j]) {
        puts("YES");
        return 0;
      }
    }
  }
  puts("NO");
  return 0;
}
