#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1);
struct Point {
  long long x, y;
  Point() {}
};
const double EPS = 1e-9;
long long n;
long long m;
Point Pa[100001];
Point Pb[20001];
double ang[100001];
long long dist(Point &a, Point &b) {
  long long tmp = (a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y);
  return tmp;
}
long long Area(Point &a, Point &b, Point &c) {
  long long tmp = (b.x - a.x) * (b.y + a.y) + (c.x - b.x) * (c.y + b.y) +
                  (a.x - c.x) * (a.y + c.y);
  return abs(tmp);
}
double Ang(Point &a, Point &b, Point &c) {
  double ba = sqrt(dist(b, a));
  double bc = sqrt(dist(b, c));
  if (abs(ba) < EPS || abs(bc) < EPS) return 1e9;
  double ac = sqrt(dist(a, c));
  double cos_ang = (double)(ba * ba + bc * bc - ac * ac) / (2.0 * ba * bc);
  return (acos(cos_ang) * 180 / PI);
}
bool on_line(Point &x, Point &a, Point &b) {
  double c = (x.y - a.y) * (b.x - a.x) - (x.x - a.x) * (b.y - a.y);
  if (abs(c) > EPS) return false;
  double d = (x.x - a.x) * (b.x - a.x) + (x.y - a.y) * (b.y - a.y);
  if (d < 0) return false;
  long long D = dist(a, b);
  if (d > D) return false;
  return true;
}
bool check_in(Point &x, Point &a, Point &b, Point &c) {
  long long a1 = Area(x, a, b);
  long long a2 = Area(x, a, c);
  long long a3 = Area(x, b, c);
  long long A = Area(a, b, c);
  if (a1 + a2 + a3 != A) return false;
  return true;
}
bool zz(Point &x, long long id) {
  if (id == -1) return false;
  if (id == 1 && (on_line(x, Pa[1], Pa[2]) || on_line(x, Pa[2], Pa[3])))
    return false;
  if (id == n - 2 && (on_line(x, Pa[n - 1], Pa[n]) || on_line(x, Pa[n], Pa[1])))
    return false;
  if (on_line(x, Pa[id + 1], Pa[id + 2])) return false;
  return check_in(x, Pa[1], Pa[id + 1], Pa[id + 2]);
}
bool check(Point &x) {
  long long l = 1, r = n - 2;
  long long ans = -1;
  double z = Ang(Pa[2], Pa[1], x);
  if (abs(z - 1e9) < EPS) return false;
  while (l <= r) {
    long long mi = (l + r) / 2;
    if (ang[mi] > z || abs(ang[mi] - z) < EPS) {
      ans = mi;
      r = mi - 1;
    } else
      l = mi + 1;
  }
  bool ok = false;
  if (ans > 1 && zz(x, ans - 1)) ok = true;
  if (ans < n - 2 && zz(x, ans + 1)) ok = true;
  if (zz(x, ans)) ok = true;
  return ok;
}
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (long long i = 1; i <= n; i++) cin >> Pa[i].x >> Pa[i].y;
  for (long long i = 2; i <= n - 1; i++)
    ang[i - 1] = Ang(Pa[2], Pa[1], Pa[i + 1]);
  cin >> m;
  for (long long i = 1; i <= m; i++) {
    cin >> Pb[i].x >> Pb[i].y;
    if (!check(Pb[i])) {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES";
}
