#include <bits/stdc++.h>
using namespace std;
struct Point {
  int x;
  int y;
};
bool cmp(Point a, Point b) {
  if (a.x == b.x) {
    return a.y < b.y;
  } else {
    return a.x < b.x;
  }
}
int main() {
  Point p1[4] = {0};
  Point p2[4] = {0};
  int arr[201][201] = {0};
  for (int i = 0; i < 4; i++) {
    cin >> p1[i].x >> p1[i].y;
  }
  for (int i = 0; i < 4; i++) {
    cin >> p2[i].x >> p2[i].y;
  }
  sort(p1, p1 + 4, cmp);
  sort(p2, p2 + 4, cmp);
  for (int i = p1[0].x; i <= p1[3].x; i++) {
    for (int j = p1[0].y; j <= p1[3].y; j++) {
      arr[i + 100][j + 100] = 1;
    }
  }
  int flag = 0;
  for (int i = p2[0].x; i <= p2[1].x; i++) {
    if (flag == 1) break;
    for (int j = p2[0].y; j <= p2[0].y + i - p2[0].x; j++) {
      if (arr[i + 100][j + 100]) {
        cout << "YES" << endl;
        flag = 1;
        break;
      }
    }
    if (flag == 1) break;
    for (int j = p2[0].y; j >= (p2[0].y - (i - p2[0].x)); j--) {
      if (arr[i + 100][j + 100]) {
        cout << "YES" << endl;
        flag = 1;
        break;
      }
    }
  }
  for (int i = p2[3].x; i >= p2[1].x; i--) {
    if (flag == 1) break;
    for (int j = p2[3].y; j <= p2[3].y + p2[3].x - i; j++) {
      if (arr[i + 100][j + 100]) {
        cout << "YES" << endl;
        flag = 1;
        break;
      }
    }
    if (flag == 1) break;
    for (int j = p2[3].y; j >= (p2[3].y - (p2[3].x - i)); j--) {
      if (arr[i + 100][j + 100]) {
        cout << "YES" << endl;
        flag = 1;
        break;
      }
    }
  }
  if (flag == 0) cout << "NO" << endl;
  return 0;
}
