#include <bits/stdc++.h>
using namespace std;
int ccw(double x1, double y1, double x2, double y2, double x3, double y3) {
  double dx1 = x2 - x1, dy1 = y2 - y1;
  double dx2 = x3 - x1, dy2 = y3 - y1;
  double t = dx1 * dy2 - dx2 * dy1;
  if (t > 0) return 1;
  if (t < 0) return -1;
  return 0;
}
double x[100100], y[100100];
int n, m;
bool inside(double i, double j) {
  int s1 = ccw(i, j, x[1], y[1], x[2], y[2]);
  int s2 = ccw(i, j, x[1], y[1], x[n], y[n]);
  if (s1 * s2 > 0) return false;
  int d = 2, c = n;
  while (c > d + 1) {
    int g = (d + c) / 2;
    int s = ccw(i, j, x[1], y[1], x[g], y[g]);
    if (s * s1 > 0)
      d = g;
    else
      c = g;
  }
  s1 = ccw(i, j, x[1], y[1], x[d], y[d]);
  s2 = ccw(i, j, x[d], y[d], x[c], y[c]);
  int s3 = ccw(i, j, x[c], y[c], x[1], y[1]);
  if ((s1 > 0 && s2 > 0 && s3 > 0) || (s1 < 0 && s2 < 0 && s3 < 0)) return true;
  if (s1 * s2 < 0 || s2 * s3 < 0 || s3 * s1 < 0) return false;
  if (s2 == 0 || (s1 == 0 && d == 2) || (s3 == 0 && c == n)) return false;
  return true;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%lf%lf", &x[i], &y[i]);
  int u = 1, v = n;
  while (u <= v) {
    double t = x[u];
    x[u] = x[v];
    x[v] = t;
    t = y[u];
    y[u] = y[v];
    y[v] = t;
    u++, v--;
  }
  bool ans = true;
  scanf("%d", &m);
  for (int i = 0; i < m; i++) {
    double u, v;
    scanf("%lf%lf", &u, &v);
    if (!inside(u, v)) {
      ans = false;
      break;
    }
  }
  if (ans)
    printf("YES");
  else
    printf("NO");
}
