#include <bits/stdc++.h>
using namespace std;
bool valid = 1;
struct pt {
  long long x, y;
  pt() {}
  pt(long long _x, long long _y) : x(_x), y(_y) {}
  pt operator-(const pt& p) const { return pt(x - p.x, y - p.y); }
};
long long cross(pt a, pt b) { return a.x * b.y - a.y * b.x; }
int n, m;
vector<pt> points;
bool point_in_polygon(pt p) {
  int lo = 2, hi = n - 1, mid, ans = -1;
  pt ap = p - points[0];
  while (lo <= hi) {
    mid = (lo + hi) >> 1;
    pt am = points[mid] - points[0];
    if (cross(am, ap) > 0)
      lo = mid + 1;
    else
      hi = mid - 1, ans = mid;
  }
  if (ans == -1) return 0;
  pt pa = points[0] - p;
  pt pb = points[ans - 1] - p;
  pt pc = points[ans] - p;
  if (ans == 2 && cross(pa, pb) == 0) return 0;
  if (ans == n - 1 && cross(pc, pa) == 0) return 0;
  if (cross(pb, pc) == 0) return 0;
  if (cross(pa, pb) >= 0 && cross(pb, pc) >= 0 && cross(pc, pa) >= 0) return 1;
  return 0;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 0; i < n; ++i) {
    long long x, y;
    cin >> x >> y;
    points.push_back(pt(x, y));
  }
  reverse(points.begin(), points.end());
  cin >> m;
  while (m--) {
    long long x, y;
    cin >> x >> y;
    valid &= point_in_polygon(pt(x, y));
  }
  cout << (valid ? "YES" : "NO");
  return 0;
}
