#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
const int MAX = 100005;
struct pt {
  double x, y;
};
pt orig;
pt point[20];
int InsidePolygon(int n) {
  int counter = 0;
  double xinters;
  pt p1, p2;
  for (int i = 0; i < n; i++) {
    p1 = point[i];
    p2 = point[i + 1];
    if (orig.y > min(p1.y, p2.y)) {
      if (orig.y <= max(p1.y, p2.y)) {
        if (orig.x <= max(p1.x, p2.x)) {
          if (p1.y != p2.y) {
            xinters = (orig.y - p1.y) * (p2.x - p1.x) / (p2.y - p1.y) + p1.x;
            if (p1.x == p2.x || orig.x <= xinters) counter++;
          }
        }
      }
    }
  }
  return counter % 2;
}
double area(pt a, pt b, pt c) {
  return (b.x - a.x) * (c.y - a.y) - (c.x - a.x) * (b.y - a.y);
}
inline bool intersect_1(double a, double b, double c, double d) {
  if (a > b) swap(a, b);
  if (c > d) swap(c, d);
  return max(a, c) <= min(b, d);
}
bool intersect(pt a, pt b, pt c, pt d) {
  return intersect_1(a.x, b.x, c.x, d.x) && intersect_1(a.y, b.y, c.y, d.y) &&
         area(a, b, c) * area(a, b, d) <= 0 &&
         area(c, d, a) * area(c, d, b) <= 0;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  for (int i = 10; i < 18; i++) cin >> point[i].x >> point[i].y;
  for (int i = 0; i < 4; i++) point[i] = point[i + 10];
  point[4] = point[0];
  for (int i = 14; i < 18; i++) {
    orig = point[i];
    if (InsidePolygon(4)) cout << "yEs" << endl, exit(0);
  }
  for (int i = 0; i < 4; i++) point[i] = point[i + 14];
  point[4] = point[0];
  for (int i = 10; i < 14; i++) {
    orig = point[i];
    if (InsidePolygon(4)) cout << "yEs" << endl, exit(0);
  }
  point[9] = point[13];
  point[18] = point[14];
  for (int i = 9; i < 13; i++) {
    for (int j = 14; j < 18; j++) {
      if (intersect(point[i], point[i + 1], point[j], point[j + 1]))
        cout << "yEs" << endl, exit(0);
    }
  }
  cout << "nO" << endl;
  return 0;
}
