#include <bits/stdc++.h>
using namespace std;
int dx[] = {0, 1, 0, -1, 1, 1, -1, -1, 0};
int dy[] = {1, 0, -1, 0, 1, -1, 1, -1, 0};
long long fix_mod(long long x, long long y) { return (y + x % y) % y; }
void fast() {
  std::ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
}
struct point {
  long double x, y;
  point() { x = 0, y = 0; }
  point(long double a, long double b) { x = a, y = b; }
  bool operator<(point o) const { return x < o.x || x == o.x && y < o.y; }
};
point polygoncentriod(vector<point>& polygon) {
  point res = point((long double)0.0, (long double)0.0);
  long double a = 0;
  for (int i = 0; i < polygon.size(); i++) {
    int j = (i + 1) % polygon.size();
    res.x += (polygon[i].x + polygon[j].x) *
             (polygon[i].x * polygon[j].y - polygon[j].x * polygon[i].y);
    res.y += (polygon[i].y + polygon[j].y) *
             (polygon[i].x * polygon[j].y - polygon[j].x * polygon[i].y);
    a += polygon[i].x * polygon[j].y - polygon[i].y * polygon[j].x;
  }
  a *= 0.5;
  res.x /= 6 * a;
  res.y /= 6 * a;
  return res;
}
long double slope(point a, point b) {
  long double x = a.x - b.x;
  long double y = a.y - b.y;
  x *= -1;
  y *= -1;
  long double theta = atan2(y, x) * 180 / acos(-1);
  theta = fmod(fmod(theta, 360.0) + 360.0, 360.0);
  return theta;
}
struct line {
  long double a, b, c;
  line() { a = 0, b = 0, c = 0; }
  line(long double x, long double y, long double z) { a = x, b = y, c = z; }
  bool operator<(line o) const {
    return a < o.a || a == o.a && b < o.b || a == o.a && b == o.b && c < o.c;
  }
  bool operator==(line o) const { return a == o.a && b == o.b && c == o.c; }
};
line get_line(point x, point y) {
  line ret;
  ret.a = x.x - y.x;
  ret.b = x.y - y.y;
  ret.c = -ret.b * x.x + ret.a * x.y;
  ret.b *= -1;
  if (ret.a < 1E-9 || fabs(ret.a) < 1E-9 && ret.b < 1E-9) {
    ret.a *= -1;
    ret.b *= -1;
    ret.c *= -1;
  }
  if (ret.a) {
    ret.b /= ret.a, ret.c /= ret.a;
    ret.a /= ret.a;
  } else if (ret.b) {
    ret.a /= ret.b, ret.c /= ret.b, ret.b /= ret.b;
  } else if (ret.c) {
    ret.a /= ret.c, ret.b /= ret.c, ret.c /= ret.c;
  }
  return ret;
}
long double get_res_matrix(long double a[2][2]) {
  return a[0][0] * a[1][1] - a[0][1] * a[1][0];
}
point intersect_in_point(line a, line b) {
  point c;
  long double delta[2][2] = {{a.a, a.b}, {b.a, b.b}};
  long double delta_y[2][2] = {{a.c, a.b}, {b.c, b.b}};
  long double delta_x[2][2] = {{a.a, a.c}, {b.a, b.c}};
  long double del = get_res_matrix(delta);
  long double del_x = get_res_matrix(delta_x);
  long double del_y = get_res_matrix(delta_y);
  c = point(del_x / del, del_y / del);
  return c;
}
long double dis(point a, point b) {
  long double x = a.x - b.x;
  long double y = a.y - b.y;
  return (long double)sqrt(x * x + y * y);
}
int main() {
  fast();
  int n;
  cin >> n;
  vector<point> v(n);
  for (int i = 0; i < n; i++) cin >> v[i].x >> v[i].y;
  point center = polygoncentriod(v);
  vector<pair<long double, point>> vv;
  for (auto b : v) {
    vv.push_back({slope(center, b), b});
  }
  sort(vv.begin(), vv.end());
  int m;
  cin >> m;
  point p;
  while (m--) {
    cin >> p.x >> p.y;
    int idx1 =
        upper_bound(vv.begin(), vv.end(), make_pair(slope(center, p), p)) -
        vv.begin();
    idx1 %= n;
    int idx2 = idx1 - 1;
    idx2 += n;
    idx2 %= n;
    line a = get_line(vv[idx1].second, vv[idx2].second);
    line b = get_line(center, p);
    point c = intersect_in_point(a, b);
    if (fabs(dis(center, p) - dis(c, center) - dis(c, p)) < 1E-9)
      return cout << "NO"
                  << "\n",
             0;
    ;
  }
  return cout << "YES"
              << "\n",
         0;
  ;
}
