#include <bits/stdc++.h>
using namespace std;
struct PT {
  long long x, y;
  PT() {}
  PT(long long x, long long y) : x(x), y(y) {}
  bool operator<(const PT &rhs) const {
    return make_pair(y, x) < make_pair(rhs.y, rhs.x);
  }
  bool operator>(const PT &rhs) const {
    return make_pair(y, x) > make_pair(rhs.y, rhs.x);
  }
  bool operator==(const PT &rhs) const {
    return make_pair(y, x) == make_pair(rhs.y, rhs.x);
  }
  PT operator+(const PT &p) const { return PT(x + p.x, y + p.y); }
  PT operator-(const PT &p) const { return PT(x - p.x, y - p.y); }
};
long long cross(PT p, PT q) { return p.x * q.y - p.y * q.x; }
bool inside(PT p, vector<PT> &left, vector<PT> &right) {
  if (p < left[0] || p > left[left.size() - 1]) return false;
  long long int v = cross(left[0] - p, left[left.size() - 1] - p);
  if (p == left[0] || p == left[left.size() - 1]) return false;
  if (left.size() == 2 || right.size() == 2) {
    if (v == 0) return false;
  }
  if (v == 0) return true;
  int idxl = upper_bound(left.begin(), left.end(), p) - left.begin();
  assert(idxl != left.size());
  idxl -= 1;
  if (p == left[idxl]) return false;
  int idxr = upper_bound(right.begin(), right.end(), p) - right.begin();
  assert(idxr != right.size());
  idxr -= 1;
  if (p == right[idxr]) return false;
  long long int vl = cross(left[idxl] - p, left[idxl + 1] - p);
  long long int vr = cross(right[idxr] - p, right[idxr + 1] - p);
  if (vl == 0 || vr == 0) return false;
  if ((v > 0 && vl < 0) || (v < 0 && vl > 0)) return true;
  if ((v > 0 && vr < 0) || (v < 0 && vr > 0)) return true;
  return false;
}
int nxt(int i, int n) { return (i + 1) % n; }
int prv(int i, int n) { return (i - 1 + n) % n; }
int main() {
  int N;
  scanf("%d", &N);
  vector<PT> poly1(N);
  for (int i = 0; i < N; i++) scanf("%lld %lld", &poly1[i].x, &poly1[i].y);
  int M;
  scanf("%d", &M);
  vector<PT> poly2(M);
  for (int i = 0; i < M; i++) scanf("%lld %lld", &poly2[i].x, &poly2[i].y);
  int bt = min_element(poly1.begin(), poly1.end()) - poly1.begin();
  int tp = max_element(poly1.begin(), poly1.end()) - poly1.begin();
  vector<PT> left, right;
  for (int i = bt; i != tp; i = nxt(i, N)) left.push_back(poly1[i]);
  left.push_back(poly1[tp]);
  for (int i = bt; i != tp; i = prv(i, N)) right.push_back(poly1[i]);
  right.push_back(poly1[tp]);
  for (int i = 0; i < poly2.size(); i++) {
    if (!inside(poly2[i], left, right)) {
      printf("NO\n");
      return 0;
    }
  }
  printf("YES\n");
  return 0;
}
