#include <bits/stdc++.h>   using namespace std;   const double EPS = 1e-9;   bool operator<(const complex<double>& a, const complex<double>& b) {     if (fabs(a.imag() - b.imag()) > EPS) return a.imag() < b.imag();     return a.real() + EPS < b.real();   }   class cmp {    public:     bool operator()(const complex<double>& a, const complex<double>& b) {       return a < b;     }   };   bool pointOnLeft(const complex<double>& p, const complex<double>& p1,                    const complex<double>& p2) {     return imag(conj(((p2) - (p1))) * (((p) - (p1)))) > EPS;   }   class cmpHull {    public:     complex<double> about, nex;     cmpHull(const complex<double>& about, const complex<double>& nex)         : about(about), nex(nex) {}     bool operator()(const complex<double>& a, const complex<double>& b) {       double crs = imag(conj(((a) - (about))) * (((b) - (about))));       if (fabs(crs) < EPS) {         if (fabs(imag(conj(((nex) - (about))) * (((a) - (about))))) < EPS)           return a < b;         return b < a;       }       return crs > 0;     }   };   void sortAntiClockwise(vector<complex<double> >& polygon) {     int about = 0;     for (int c = 1; c < (int)polygon.size(); c++)       if (polygon[c] < polygon[about]) about = c;     swap(polygon[about], polygon[0]);     sort(polygon.begin() + 1, polygon.end(), cmpHull(polygon[0], polygon[0]));     sort(polygon.begin() + 2, polygon.end(), cmpHull(polygon[0], polygon[1]));     return;   }   vector<complex<double> > convexHull(vector<complex<double> >& polygon) {     sortAntiClockwise(polygon);     vector<complex<double> > hull;     int sz = 0;     for (int i = 0; i < (int)polygon.size(); i++) {       while (sz >= 2 && pointOnLeft(polygon[i], hull[sz - 1], hull[sz - 2])) {         hull.pop_back();         sz--;       }       sz++;       hull.push_back(polygon[i]);     }     return hull;   }   vector<complex<double> > shift(const vector<complex<double> >& A, int pivot) {     vector<complex<double> > ret;     for (int c = pivot; c < pivot + (int)A.size(); c++)       ret.push_back(A[c % A.size()]);     return ret;   }   vector<complex<double> > A, B, all;   int n, m;   int main() {     set<complex<double>, cmp> ss;     int c, c2;     scanf( %d , &n);     int x, y;     for (c = 0; c < n; c++) {       scanf( %d%d , &x, &y);       A.push_back(complex<double>(x, y));       all.push_back(complex<double>(x, y));       ss.insert(complex<double>(x, y));     }     scanf( %d , &m);     for (c = 0; c < m; c++) {       scanf( %d%d , &x, &y);       B.push_back(complex<double>(x, y));       all.push_back(complex<double>(x, y));       ss.insert(complex<double>(x, y));     }     if (ss.size() < all.size()) {       printf( NO n );       return 0;     }     reverse(A.begin(), A.end());     reverse(B.begin(), B.end());     int pivot = 0;     for (c = 1; c < (int)A.size(); c++)       if (A[c] < A[pivot]) pivot = c;     A = shift(A, pivot);     vector<complex<double> > hull = convexHull(all);     if (hull.size() != A.size()) {       printf( NO n );       return 0;     }     bool yes = true;     for (c = 0; c < (int)hull.size(); c++)       if (hull[c] < A[c] || A[c] < hull[c]) yes = false;     if (yes)       printf( YES n );     else       printf( NO n );   }