#include <bits/stdc++.h>
using namespace std;
struct pt {
  int x, y;
  pt(int a, int b) {
    x = a;
    y = b;
  }
};
int area(pt a, pt b, pt c) {
  return (b.x - a.x) * (c.y - a.y) - (b.y - a.y) * (c.x - a.x);
}
bool intersect_1(int a, int b, int c, int 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() {
  vector<pt> fir, sec;
  int x, y;
  for (int i = 0; i < 4; ++i) {
    cin >> x >> y;
    fir.emplace_back(x, y);
  }
  for (int i = 0; i < 4; ++i) {
    cin >> x >> y;
    sec.emplace_back(x, y);
  }
  for (int i = 0; i < 4; ++i)
    for (int j = i + 1; j < 4; ++j)
      for (int i2 = 0; i2 < 4; ++i2)
        for (int j2 = i2 + 1; j2 < 4; ++j2)
          if (intersect(fir[i], fir[j], sec[i2], sec[j2])) {
            cout << "yeS" << endl;
            return 0;
          }
  cout << "NO" << endl;
  return 0;
}
