#include <bits/stdc++.h>
using namespace std;
const long long M = 2000000000;
long long n, cn, ci;
struct point {
  long long x, y;
  point() {}
  point(long long _x, long long _y) {
    x = _x;
    y = _y;
  }
  point operator-(point t) {
    point r;
    r.x = x - t.x;
    r.y = y - t.y;
    return r;
  }
  long long operator*(point t) { return x * t.y - y * t.x; }
} p[100001], q[10];
long long mult(point p0, point p1, point p2) {
  return (p1.x - p0.x) * (p2.y - p0.y) - (p1.y - p0.y) * (p2.x - p0.x);
}
bool cir_out(long long n, point cir) {
  long long now, pre = mult(p[0], p[1], cir);
  for (long long i = 1; i < n; i++) {
    now = mult(p[i], p[(i + 1) % n], cir);
    if ((now >= 0 && pre <= 0) || (now <= 0 && pre >= 0)) return true;
    pre = now;
  }
  return false;
}
int main() {
  long long n, m;
  cin >> n;
  for (long long i = 0; i < n; i++) {
    cin >> p[i].x >> p[i].y;
  }
  cin >> m;
  q[0].x = M, q[0].y = -M;
  q[1].x = M, q[1].y = M;
  q[2].x = -M, q[2].y = -M;
  q[3].x = -M, q[3].y = M;
  q[4].x = M;
  q[5].x = -M;
  q[6].y = M;
  q[7].y = -M;
  long long xx, yy;
  for (int i = 0; i < m; i++) {
    cin >> xx >> yy;
    if (q[0].x >= xx && q[0].y <= yy) q[0].x = xx, q[0].y = yy;
    if (q[1].x >= xx && q[1].y >= yy) q[1].x = xx, q[1].y = yy;
    if (q[2].x <= xx && q[2].y <= yy) q[2].x = xx, q[2].y = yy;
    if (q[3].x <= xx && q[3].y >= yy) q[3].x = xx, q[3].y = yy;
    if (q[4].x >= xx) {
      q[4].x = xx, q[4].y = yy;
    }
    if (q[5].x <= xx) {
      q[5].x = xx, q[5].y = yy;
    }
    if (q[6].y >= yy) {
      q[6].x = xx, q[6].y = yy;
    }
    if (q[7].y <= yy) {
      q[7].x = xx, q[7].y = yy;
    }
  }
  int flag = 1;
  for (int i = 0; i < 8; i++) {
    if (cir_out(n, q[i])) {
      flag = 0;
    }
  }
  if (flag)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
