#include <bits/stdc++.h>
using namespace std;
int pol(long long x1, long long fshdkj, long long x2, long long y2,
        long long x0, long long y0) {
  long long A = y2 - fshdkj;
  long long B = x1 - x2;
  long long C = -A * x1 - B * fshdkj;
  long long t = A * x0 + B * y0 + C;
  if (t == 0) return 0;
  if (t < 0) return -1;
  if (t > 0) return 1;
}
bool intr(long long x1, long long fshdkj, long long x2, long long y2,
          long long x3, long long y3, long long x0, long long y0) {
  int t = pol(x1, fshdkj, x2, y2, x0, y0);
  int y = pol(x2, y2, x3, y3, x0, y0);
  int u = pol(x3, y3, x1, fshdkj, x0, y0);
  if (t == 0 || y == 0 || u == 0) return false;
  return (t == y && y == u);
}
int n, m;
long long x[100005], y[100005];
double p[100005], angle;
bool ans;
bool find(int left, int right, long long &x0, long long &y0) {
  int midle = (left + right) / 2;
  int r = pol(x[1], y[1], x[midle], y[midle], x0, y0);
  int t = pol(x[1], y[1], x[midle + 1], y[midle + 1], x0, y0);
  int k = pol(x[midle], y[midle], x[midle + 1], y[midle + 1], x0, y0);
  if (k != 0 && ((r == 0 && midle != 2) || (t == 0 && (midle + 1) != n)))
    return true;
  if (t != r) {
    return intr(x[1], y[1], x[midle], y[midle], x[midle + 1], y[midle + 1], x0,
                y0);
  }
  if (left == right) return false;
  if (r == 1)
    return find(left, midle - 1, x0, y0);
  else
    return find(midle + 1, right, x0, y0);
}
int main() {
  cin >> n;
  for (int i = (n); (i) >= (1); (i)--) cin >> x[i] >> y[i];
  ans = true;
  cin >> m;
  for (int i = (1); (i) <= (m); (i)++) {
    long long x0, y0;
    cin >> x0 >> y0;
    if (!find(2, n - 1, x0, y0)) {
      ans = false;
      break;
    }
  }
  if (ans)
    cout << "YES\n";
  else
    cout << "NO\n";
  return 0;
}
