#include <bits/stdc++.h>
using namespace std;
struct r {
  long long x, y;
  r() {}
  r(long long _x, long long _y) { x = _x, y = _y; }
  r(r a, r b) { x = b.x - a.x, y = b.y - a.y; }
  long long len() { return x * x + y * y; }
};
long long cp(r a, r b) { return a.x * b.y - b.x * a.y; }
long long dp(r a, r b) { return a.x * b.x + a.y * b.y; }
bool inside(r a, r b, r c, r p) {
  return (cp(r(a, p), r(a, b)) >= 0 && cp(r(b, p), r(b, c)) > 0 &&
          cp(r(c, p), r(c, a)) >= 0);
}
const long long maxn = 1e5;
r p[maxn];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long n;
  cin >> n;
  for (long long i = 0; i < n; i++) cin >> p[i].x >> p[i].y;
  long long m;
  cin >> m;
  while (m--) {
    r q;
    cin >> q.x >> q.y;
    if (cp(r(p[0], q), r(p[0], p[1])) <= 0 ||
        cp(r(p[0], q), r(p[0], p[n - 1])) >= 0)
      cout << "NO", exit(0);
    long long _l = 0, _r = n - 2;
    while (_l != _r) {
      long long t = (_l + _r + 1) / 2;
      if (cp(r(p[0], q), r(p[0], p[t])) >= 0)
        _l = t;
      else
        _r = t - 1;
    }
    if (!inside(p[0], p[_l], p[_l + 1], q)) cout << "NO", exit(0);
  }
  cout << "YES";
  return 0;
}
