func_code_string: #include <bits/stdc++.h>   using namespace std;   const int MAXN = int(5e4) + 100;   const int MOD = int(360);   const int oo = INT_MAX;   const long double PI = acos(-1.0);   const long double EPS = 1e-9;   struct pt {     long double x, y;     pt() {}     pt(long double x, long double y) : x(x), y(y) {}   };   inline long double x(pt P) { return P.x; }   inline long double y(pt P) { return P.y; }   istream& operator>>(istream& in, pt& p) {     long double x, y;     in >> x >> y;     p = pt(x, y);     return in;   }   ostream& operator<<(ostream& out, const pt& p) {     out <<  (  << double(p.x) <<  ,   << double(p.y) <<  ) ;     return out;   }   pt operator+(const pt& A, const pt& B) { return pt(x(A) + x(B), y(A) + y(B)); }   pt operator-(const pt& A, const pt& B) { return pt(x(A) - x(B), y(A) - y(B)); }   pt operator*(const pt& A, const pt& B) {     return pt(x(A) * x(B) - y(A) * y(B), x(A) * y(B) + y(A) * x(B));   }   pt operator*(const pt& A, const long double& B) {     return pt(x(A) * B, y(A) * B);   }   pt operator*(const long double& B, const pt& A) {     return pt(x(A) * B, y(A) * B);   }   pt operator/(const pt& A, const long double& B) {     return pt(x(A) / B, y(A) / B);   }   inline long double norm(pt A) { return x(A) * x(A) + y(A) * y(A); }   inline long double abs(pt A) { return sqrt(norm(A)); }   inline long double cross(pt A, pt B) { return x(A) * y(B) - y(A) * x(B); }   inline long double dot(pt A, pt B) { return x(A) * x(B) + y(A) * y(B); }   inline bool same(long double a, long double b) {     return a + EPS > b && b + EPS > a;   }   inline bool samePt(pt A, pt B) { return same(x(A), x(B)) && same(y(A), y(B)); }   inline long double dist(pt A, pt B) { return abs(B - A); }   inline pt rotcw(pt p) { return p * pt(0, -1); }   inline bool segContains(pt X, pt A, pt B) {     if (samePt(X, A) || samePt(X, B)) return 1;     if (!same(0, cross(A - X, B - X))) return 0;     return (dot(A - X, B - X) < EPS);   }   pt linesIntersection(pt A, pt B, pt C, pt D) {     long double x = cross(C, D - C) - cross(A, D - C);     x /= cross(B - A, D - C);     return A + x * (B - A);   }   double signedArea(const vector<pt>& P) {     double result = 0.0;     for (int i = 0; i < (int)P.size() - 1; i++) result += cross(P[i], P[i + 1]);     return result / 2.0;   }   vector<pt> reorganize(vector<pt>& P) {     int n = int(P.size());     vector<pt> R(n);     if (P.size() == 1) {       R[0] = P[0];       return R;     }     if (signedArea(P) > EPS) {       reverse(P.begin(), P.end());     }     int s = 0;     for (int i = 1; i < n; ++i) {       if (x(P[s]) > x(P[i]) || (x(P[s]) == x(P[i]) && y(P[s]) > y(P[i]))) {         s = i;       }     }     R[0] = P[s];     for (int i = (s + 1) % n, j = 1; i != s; i = (i + 1) % n, ++j) {       if (samePt(P[i], P[(i - 1 + n) % n])) {         j--;         continue;       }       R[j] = P[i];     }     R[n - 1] = R[0];     return R;   }   vector<pt> convexPolygonSum(vector<pt>& P, vector<pt>& Q) {     P = reorganize(P);     Q = reorganize(Q);     int n = int(P.size()), m = int(Q.size());     vector<pt> R(n + m - 1);     R[0] = (P[0] + Q[0]);     int i = 1, j = 1, k = 1;     for (; i < n && j < m; ++k) {       if (cross(P[i] - P[i - 1], Q[j] - Q[j - 1]) < -EPS) {         R[k] = R[k - 1] + (P[i] - P[i - 1]);         ++i;       } else {         R[k] = R[k - 1] + (Q[j] - Q[j - 1]);         ++j;       }     }     while (i < n) {       R[k] = R[k - 1] + (P[i] - P[i - 1]);       ++i;       ++k;     }     while (j < m) {       R[k] = R[k - 1] + (Q[j] - Q[j - 1]);       ++j;       ++k;     }     vector<pt> T;     T.push_back(R[0]);     for (int i = 1; i + 1 < int(R.size()); ++i) {       if (same(cross(R[i] - R[i - 1], R[i + 1] - R[i - 1]), 0.0)) continue;       T.push_back(R[i]);     }     T.push_back(T[0]);     return T;   }   int inConvexPolygon(pt X, long double mnx, long double mxx, vector<pt>& P) {     if (x(X) < mnx || x(X) > mxx) return -1;     int lo = 1, hi = int(P.size()) - 1, mi;     while (lo <= hi) {       mi = (lo + hi) / 2;       if (cross(P[mi] - P[0], X - P[0]) < -EPS) {         lo = mi + 1;       } else {         hi = mi - 1;       }     }     lo = hi;     if (hi == -1) return -1;     long double c = cross(X - P[lo], X - P[lo + 1]);     if (same(c, 0.0)) return (segContains(X, P[lo], P[lo + 1]) ? 0 : -1);     if (c > EPS) return -1;     return 1;   }   int l, n, m, q;   int main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     while (cin >> l) {       vector<pt> P1(l + 1);       for (int i = 0; i < l; ++i) {         cin >> P1[i];       }       cin >> n;       vector<pt> P2(n + 1);       for (int i = 0; i < n; ++i) {         cin >> P2[i];       }       cin >> m;       vector<pt> P3(m + 1);       for (int i = 0; i < m; ++i) {         cin >> P3[i];       }       P1[l] = P1[0];       P2[n] = P2[0];       P3[m] = P3[0];       vector<pt> P = convexPolygonSum(P2, P3);       P = convexPolygonSum(P1, P);       long double mnx = x(P[0]);       long double mxx = -oo;       for (int i = 0; i < int(P.size()); ++i) {         mxx = max(mxx, x(P[i]));       }       cin >> q;       for (int i = 0; i < q; ++i) {         pt cur;         cin >> cur;         cur = 3.0 * cur;         if (inConvexPolygon(cur, mnx, mxx, P) >= 0) {           cout <<  YES n ;         } else {           cout <<  NO n ;         }       }     }     return 0;   }   