#include <bits/stdc++.h>
using namespace std;
long long powermod(long long _a, long long _b, long long _m) {
  long long _r = 1;
  while (_b) {
    if (_b % 2 == 1) _r = (_r * _a) % _m;
    _b /= 2;
    _a = (_a * _a) % _m;
  }
  return _r;
}
long long string_to_number(string s) {
  long long x = 0;
  stringstream convert(s);
  convert >> x;
  return x;
}
long long add(long long a, long long b) {
  long long x = (a + b) % 1000003;
  return x;
}
long long mul(long long a, long long b) {
  long long x = (a * b) % 1000003;
  return x;
}
long long sub(long long a, long long b) {
  long long x = (a - b + 1000003) % 1000003;
  return x;
}
long long divi(long long a, long long b) {
  long long x = a;
  long long y = powermod(b, 1000003 - 2, 1000003);
  long long res = (x * y) % 1000003;
  return res;
}
bool primes[100001] = {0};
vector<vector<int> > v(2001);
bool vis[2001] = {0};
int ma = 0;
void prime() {
  primes[0] = 1;
  primes[1] = 1;
  for (int i = 2; i <= 100000; i++) {
    if (!primes[i]) {
      for (int j = i * 2; j <= 100000; j += i) {
        primes[j] = 1;
      }
    }
  }
}
double fac(int n) {
  if (n <= 1)
    return 1.0;
  else
    return n * (fac(n - 1));
}
int dfs(int n, int cnt) {
  ma = max(cnt, ma);
  cnt++;
  vis[n] = 1;
  for (int i = 0; i < v[n].size(); i++) {
    if (!vis[v[n][i]]) {
      dfs(v[n][i], cnt);
    }
  }
  return ma;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long double a[8], b[8];
  long double minxa = INT_MAX, maxxa = INT_MIN, minya = INT_MAX,
              maxya = INT_MIN;
  for (int i = 0; i < 8; i++) {
    cin >> a[i];
    if (i % 2) {
      minya = min(minya, a[i]);
      maxya = max(maxya, a[i]);
    } else {
      minxa = min(minxa, a[i]);
      maxxa = max(maxxa, a[i]);
    }
  }
  for (int i = 0; i < 8; i++) cin >> b[i];
  long double tot =
      (b[0] - b[2]) * (b[0] - b[2]) + (b[1] - b[3]) * (b[1] - b[3]);
  long double x1, y1, x2, y2, x3, y3, area;
  for (int i = minxa; i <= maxxa; i++) {
    for (int j = minya; j <= maxya; j++) {
      x3 = (long double)i;
      y3 = (long double)j;
      area = 0;
      for (int k = 0; k < 8; k += 2) {
        x1 = b[k];
        y1 = b[k + 1];
        x2 = b[k + 2];
        y2 = b[k + 3];
        if (k == 6) {
          x2 = b[0];
          y2 = b[1];
        }
        area += abs((x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2)) / 2);
      }
      if (area == tot) {
        cout << "YES";
        return 0;
      }
    }
  }
  cout << "NO";
  return 0;
}
