#include <bits/stdc++.h>
using namespace std;
const int Shift = 1e9 + 1;
void NO() {
  cout << "NO" << endl;
  exit(0);
}
int main() {
  int n, m;
  cin >> n;
  vector<pair<long long, long long>> a, b;
  for (int i = 0; i < n; i++) {
    long long x, y;
    cin >> x >> y;
    a.push_back(make_pair(x, y));
  }
  cin >> m;
  for (int i = 0; i < m; i++) {
    long long x, y;
    cin >> x >> y;
    b.push_back(make_pair(x, y));
  }
  long long lx = Shift, ly = -Shift;
  long long rx = -Shift, ry = Shift;
  int li = -1, ri = -1;
  for (int i = 0; i < n; i++) {
    auto p = a[i];
    if (p.first < lx) {
      lx = p.first;
      ly = p.second;
      li = i;
    } else if (p.first == lx && p.second > ly) {
      ly = p.second;
      li = i;
    }
    if (p.first > rx) {
      rx = p.first;
      ry = p.second;
      ri = i;
    } else if (p.first == rx && p.second < ry) {
      ry = p.second;
      ri = i;
    }
  }
  if (ri < li) {
    vector<pair<long long, long long>> ca;
    for (int i = li; i < n; i++) ca.push_back(a[i]);
    for (int i = 0; i < li; i++) ca.push_back(a[i]);
    a = ca;
    ri = ri + n - li;
    li = 0;
  }
  sort(b.begin(), b.end());
  priority_queue<pair<long long, pair<long long, bool>>,
                 vector<pair<long long, pair<long long, bool>>>,
                 greater<pair<long long, pair<long long, bool>>>>
      pq;
  for (int i = li; i <= ri; i++)
    pq.push(make_pair(a[i].first, make_pair(-a[i].second, true)));
  for (auto p : b) pq.push(make_pair(p.first, make_pair(-p.second, false)));
  auto p1 = a[li];
  stack<pair<long long, long long>> bList;
  while (!pq.empty()) {
    auto top = pq.top();
    pq.pop();
    long long x = top.first, y = -top.second.first;
    bool a = top.second.second;
    if (a) {
      while (!bList.empty()) {
        auto bItem = bList.top();
        long long area = p1.first * (bItem.second - y) +
                         bItem.first * (y - p1.second) +
                         x * (p1.second - bItem.second);
        if (area <= 0) NO();
        bList.pop();
      }
      p1 = make_pair(x, y);
    } else {
      bList.push(make_pair(x, y));
    }
  }
  if (!bList.empty()) NO();
  for (int i = ri; i < n; i++)
    pq.push(make_pair(a[i].first, make_pair(-a[i].second, true)));
  for (int i = 0; i <= li; i++)
    pq.push(make_pair(a[i].first, make_pair(-a[i].second, true)));
  for (auto p : b) pq.push(make_pair(p.first, make_pair(-p.second, false)));
  while (!pq.empty()) {
    auto top = pq.top();
    pq.pop();
    long long x = top.first, y = -top.second.first;
    bool a = top.second.second;
    if (a) {
      while (!bList.empty()) {
        auto bItem = bList.top();
        long long area = p1.first * (bItem.second - y) +
                         bItem.first * (y - p1.second) +
                         x * (p1.second - bItem.second);
        if (area >= 0) NO();
        bList.pop();
      }
      p1 = make_pair(x, y);
    } else {
      bList.push(make_pair(x, y));
    }
  }
  if (!bList.empty()) NO();
  cout << "YES" << endl;
}
