#include <bits/stdc++.h>
std::array<int, 5> s1, s2, s3, s4;
bool Check1(int i, int j) {
  if (i >= std::min(s1[1], s1[3]) && i <= std::max(s1[1], s1[3]) &&
      j >= std::min(s2[1], s2[3]) && j <= std::max(s2[1], s2[3])) {
    return true;
  } else {
    return false;
  }
}
bool Check2(int i, int j) {
  int x = (s3[1] + s3[3]) / 2;
  int y = (s4[1] + s4[3]) / 2;
  if (std::abs(i - x) + std::abs(j - y) <=
      std::max(std::abs(s3[1] - x), std::abs(s3[2] - x))) {
    return true;
  } else {
    return false;
  }
}
int main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(nullptr);
  for (int i = 1; i <= 4; ++i) {
    std::cin >> s1[i] >> s2[i];
  }
  for (int i = 1; i <= 4; ++i) {
    std::cin >> s3[i] >> s4[i];
  }
  for (int i = -100; i <= 100; ++i) {
    for (int j = -100; j <= 100; ++j) {
      if (Check1(i, j) && Check2(i, j)) {
        std::cout << "YES" << std::endl;
        return 0;
      }
    }
  }
  std::cout << "NO" << std::endl;
  return 0;
}
