#include <bits/stdc++.h>
const int N = (int)1e5 + 123;
const double eps = 1e-8;
const int inf = (int)1e9 + 123;
using namespace std;
struct Point {
  double x, y;
  Point() {}
  Point(double x, double y) : x(x), y(y) {}
};
struct Vector {
  double x, y;
  Vector() {}
  Vector(double x, double y) : x(x), y(y) {}
  Vector(Point a, Point b) : x(b.x - a.x), y(b.y - a.y) {}
};
struct Line {
  Point l, r;
  double A, B, C;
  Line() {}
  Line(double A, double B, double C) : A(A), B(B), C(C) {}
  Line(Point a, Point b) {
    l = a, r = b;
    A = r.y - l.y;
    B = l.x - r.x;
    C = -1 * (A * l.x + B * l.y);
  }
};
struct Segment {
  Point l, r;
  Segment() {}
  Segment(Point l, Point r) : l(l), r(r) {}
};
struct Polygon {
  int n;
  vector<Point> a;
  double area;
  Polygon() {
    n = 0;
    area = 0.0;
    a.clear();
  }
  Polygon(vector<Point> a) : a(a) {}
} A, B;
inline double crossProduct(Vector a, Vector b) { return a.x * b.y - a.y * b.x; }
inline bool isContained(Point x, Line v) {
  double res = v.A * x.x + v.B * x.y + v.C;
  if (fabs(res - 0) < eps) return 1;
  return 0;
}
inline bool isContained(Point x, Segment v) {
  if (!isContained(x, Line(v.l, v.r))) return 0;
  double res = crossProduct(Vector(v.l, v.r), Vector(v.l, x));
  if (fabs(res - 0) > eps) return 0;
  res = crossProduct(Vector(v.r, v.l), Vector(v.r, x));
  if (fabs(res - 0) > eps) return 0;
  return 1;
}
inline bool isInside(Point &x, Polygon &v) {
  int l, r, m, ans, cnt;
  l = 1, r = v.n - 1, m = -1, ans = -1, cnt = 0;
  while (l <= r) {
    m = (l + r) / 2;
    if (crossProduct(Vector(v.a[0], v.a[m]), Vector(v.a[0], x)) <= 0) {
      ans = m;
      l = m + 1;
    } else
      r = m - 1;
  }
  if (ans == -1 || ans == v.n - 1) return 0;
  if (crossProduct(Vector(v.a[ans], v.a[ans + 1]), Vector(v.a[ans], x)) >= 0)
    return 0;
  if (isContained(x, Segment(v.a[ans], v.a[ans + 1]))) return 0;
  if (ans == 1 && isContained(x, Segment(v.a[0], v.a[ans]))) return 0;
  if (ans == v.n - 2 && isContained(x, Segment(v.a[0], v.a[ans + 1]))) return 0;
  return 1;
}
Point a;
int main() {
  scanf("%d", &A.n);
  for (int i = 1; i <= A.n; i++) {
    scanf("%lf%lf", &a.x, &a.y);
    A.a.push_back(a);
  }
  scanf("%d", &B.n);
  for (int i = 1; i <= B.n; i++) {
    scanf("%lf%lf", &a.x, &a.y);
    B.a.push_back(a);
  }
  for (auto i : B.a)
    if (!isInside(i, A)) {
      printf("NO");
      return 0;
    }
  printf("YES");
  return 0;
}
