#include <bits/stdc++.h>   using namespace std;   struct point {     long double x, y, s;     point() {}     point(int xx, int yy, point o) {       x = (long double)xx, y = (long double)yy;       s = atan2(y - o.y, x - o.x);     }   } o, p;   bool operator<(point _1, point _2) {     if (_1.s == _2.s) {       return _1.x < _2.x;     }     return _1.s < _2.s;   }   point operator-(point a, point b) { return point(a.x - b.x, a.y - b.y, o); }   long double Cro(point a, point b) { return a.x * b.y - a.y * b.x; }   int px[5], py[5], n;   set<point> s;   set<point>::iterator getpre(set<point>::iterator it) {     if (it == s.begin()) {       return --s.end();     }     return --it;   }   set<point>::iterator getnxt(set<point>::iterator it) {     if ((++it) == s.end()) {       return s.begin();     }     return it;   }   void Insert(point p) {     s.insert(p);     set<point>::iterator tmp = s.find(p);     set<point>::iterator i = getpre(tmp), j = getpre(i);     while (Cro(p - (*j), (*i) - (*j)) >= 0) {       s.erase(i);       i = j, j = getpre(j);     }     i = getnxt(tmp), j = getnxt(i);     while (Cro(p - (*j), (*i) - (*j)) <= 0) {       s.erase(i);       i = j, j = getnxt(j);     }     return;   }   int main() {     {       n = 0;       char ch;       int f = 0;       do {         ch = getchar();         if (ch ==  - ) {           f = 1;         }       } while (ch <  0  || ch >  9 );       while ( 0  <= ch && ch <=  9 ) {         n = (n << 1) + (n << 3) + ch - 48;         ch = getchar();       }       if (f) n = -n;     }     int op, x, y;     for (int i = 1; i <= 3; i++) {       {         op = 0;         char ch;         int f = 0;         do {           ch = getchar();           if (ch ==  - ) {             f = 1;           }         } while (ch <  0  || ch >  9 );         while ( 0  <= ch && ch <=  9 ) {           op = (op << 1) + (op << 3) + ch - 48;           ch = getchar();         }         if (f) op = -op;       }       {         px[i] = 0;         char ch;         int f = 0;         do {           ch = getchar();           if (ch ==  - ) {             f = 1;           }         } while (ch <  0  || ch >  9 );         while ( 0  <= ch && ch <=  9 ) {           px[i] = (px[i] << 1) + (px[i] << 3) + ch - 48;           ch = getchar();         }         if (f) px[i] = -px[i];       }       {         py[i] = 0;         char ch;         int f = 0;         do {           ch = getchar();           if (ch ==  - ) {             f = 1;           }         } while (ch <  0  || ch >  9 );         while ( 0  <= ch && ch <=  9 ) {           py[i] = (py[i] << 1) + (py[i] << 3) + ch - 48;           ch = getchar();         }         if (f) py[i] = -py[i];       }       o.x += (long double)px[i], o.y += (long double)py[i];     }     o.x /= 3.0, o.y /= 3.0;     for (int i = 1; i <= 3; i++) {       s.insert(point(px[i], py[i], o));     }     for (int i = 4; i <= n; i++) {       {         op = 0;         char ch;         int f = 0;         do {           ch = getchar();           if (ch ==  - ) {             f = 1;           }         } while (ch <  0  || ch >  9 );         while ( 0  <= ch && ch <=  9 ) {           op = (op << 1) + (op << 3) + ch - 48;           ch = getchar();         }         if (f) op = -op;       }       {         x = 0;         char ch;         int f = 0;         do {           ch = getchar();           if (ch ==  - ) {             f = 1;           }         } while (ch <  0  || ch >  9 );         while ( 0  <= ch && ch <=  9 ) {           x = (x << 1) + (x << 3) + ch - 48;           ch = getchar();         }         if (f) x = -x;       }       {         y = 0;         char ch;         int f = 0;         do {           ch = getchar();           if (ch ==  - ) {             f = 1;           }         } while (ch <  0  || ch >  9 );         while ( 0  <= ch && ch <=  9 ) {           y = (y << 1) + (y << 3) + ch - 48;           ch = getchar();         }         if (f) y = -y;       }       p = point(x, y, o);       set<point>::iterator nxt = s.lower_bound(p);       if (nxt == s.end()) {         nxt = s.begin();       }       set<point>::iterator pre = getpre(nxt);       if (op == 1) {         if (Cro(p - (*pre), (*nxt) - p) > 0) {           Insert(p);         }       } else {         if (Cro(p - (*pre), (*nxt) - p) > 0) {           puts( NO );         } else {           puts( YES );         }       }     }     return 0;   }