#include <bits/stdc++.h>
using namespace std;
long long int power(long long int a, long long int n) {
  if (n == 0) return 1;
  if ((n % 2) == 0)
    return (power((a * a) % 1000000007, n / 2)) % 1000000007;
  else
    return (a * (power((a * a) % 1000000007, n / 2)) % 1000000007) % 1000000007;
}
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long int min1 = 200, min2 = 200, min3 = 200, min4 = 200;
  long long int max1 = -200, max2 = -200, max3 = -200, max4 = -200;
  long long int x, y;
  for (int i = 0; i < 4; i++) {
    cin >> x >> y;
    min1 = min(min1, x), min2 = min(min2, y);
    max1 = max(max1, x), max2 = max(max2, y);
  }
  for (int i = 0; i < 4; i++) {
    cin >> x >> y;
    min3 = min(min3, x - y), min4 = min(min4, x + y);
    max3 = max(max3, x - y), max4 = max(max4, x + y);
  }
  bool a = 0;
  for (int x = -100; x <= 100 && !a; x++) {
    for (int y = -100; y <= 100 && !a; y++) {
      a = (x >= min1 && x <= max1 && y >= min2 && y <= max2 &&
           (x - y) >= min3 && (x - y) <= max3 && (x + y) >= min4 &&
           (x + y) <= max4);
    }
  }
  if (a == 0) {
    cout << "NO"
         << "\n";
  } else {
    cout << "YES"
         << "\n";
  }
  return 0;
}
