#include <bits/stdc++.h>
using namespace std;
struct point64_t {
  int64_t x, y;
  point64_t() { x = 0, y = 0; }
  point64_t(int64_t a, int64_t b) { x = a, y = b; }
};
int64_t ask(point64_t a, point64_t b, point64_t c) {
  return a.x * (b.y - c.y) + b.x * (c.y - a.y) + c.x * (a.y - b.y);
}
int main() {
  int64_t n;
  cin >> n;
  vector<point64_t> a(n);
  for (int64_t i = 0; i < n; ++i) cin >> a[i].x >> a[i].y;
  int64_t m;
  cin >> m;
  while (m--) {
    point64_t p;
    cin >> p.x >> p.y;
    if (ask(a[0], a[1], p) >= 0) {
      cout << "NO";
      return 0;
    }
    if (ask(a[0], a[n - 1], p) <= 0) {
      cout << "NO";
      return 0;
    }
    int64_t l = 1, r = n - 1;
    while (l != r) {
      int64_t m = (l + r) / 2;
      if (ask(a[0], a[m], p) < 0) {
        l = m + 1;
      } else
        r = m;
    }
    if (ask(a[l - 1], a[l], p) >= 0) {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES";
}
