#include <set>
#include <map>
#include <queue>
#include <string>
#include <vector>
#include <cmath>
#include <cctype>
#include <cstdio>
#include <cstdlib>
#include <climits>
#include <cstring>
#include <iostream>
#include <cassert>
#include <algorithm>

using namespace std;

#define foreach(e,x) for(__typeof(x.begin()) e=x.begin(); e!=x.end(); ++e)

const int N = 300000 + 10;
const int MOD = 1e9 + 7;
const int INF = 1000000 + 10;

struct Point
{
    int x, y;
    Point() {}
    Point(int x, int y) :x(x), y(y) {}
    void read() {
        scanf("%d%d", &x, &y);
    }
    Point operator - (const Point &that) const {
        return Point(x - that.x, y - that.y);
    }
    int operator < (const Point &that) const {
        return x < that.x;
    }
    long long det(const Point &that) const {
        return (long long)x * that.y - (long long)y * that.x;
    }
};

struct ConvexHull
{
    set<Point> a;
    int opt;
    int xl, xr;
    ConvexHull() {}
    void clear() {
        a.clear();
        xl = INF;
        xr = -INF;
    }
    int ok(Point u) {
        if (a.empty()) return false;
        if (u.x < xl) return false;
        if (u.x > xr) return false;
        set<Point>::iterator it = lower_bound(a.begin(), a.end(), u);
        if (it->x == u.x) {
            return (it->y - u.y) * opt >= 0;
        } else {
            set<Point>::iterator l = it, r = it;
            -- l;
            return ((*r) - (*l)).det(u - (*l)) * opt <= 0;
        }
    }
    void insert(Point u) {
        if (ok(u)) return;
        set<Point>::iterator l, r;
        r = lower_bound(a.begin(), a.end(), u);
        for( ; ; ) {
            l = r;
            if (l == a.end()) break;
            ++ r;
            if (r == a.end()) break;
            if ((*l - u).det(*r - u) * opt >= 0) {
                a.erase(l);
            } else break;
        }
        l = lower_bound(a.begin(), a.end(), u);
        if (l != a.end() && l->x == u.x)
            a.erase(l);

        r = lower_bound(a.begin(), a.end(), u);
        for( ; ; ) {
            l = r;
            if (l == a.begin()) break;
            -- l; r = l;
            if (r == a.begin()) break;
            -- r;
            if ((*l - u).det(*r - u) * opt <= 0) {
                a.erase(l);
            } else break;
        }
        a.insert(u);
        xl = min(xl, u.x);
        xr = max(xr, u.x);
    }
} up, down;

int q;

void solve()
{
    int t;
    up.clear();
    down.clear();
    up.opt = 1;
    down.opt = -1;
    Point u;
    for( ; q -- ; ) {
        scanf("%d", &t);
        u.read();
        if (t == 1) {
            up.insert(u);
            down.insert(u);
        } else {
            if (up.ok(u) && down.ok(u)) {
                puts("YES");
            } else {
                puts("NO");
            }
        }
    }
}

int main()
{
    for( ; cin >> q; ) {
        solve();
    }
    return 0;
}


#include <set>
#include <map>
#include <queue>
#include <string>
#include <vector>
#include <cmath>
#include <cctype>
#include <cstdio>
#include <cstdlib>
#include <climits>
#include <cstring>
#include <iostream>
#include <cassert>
#include <algorithm>

using namespace std;

#define foreach(e,x) for(__typeof(x.begin()) e=x.begin(); e!=x.end(); ++e)

const int N = 300000 + 10;
const int MOD = 1e9 + 7;
const int INF = 1000000 + 10;

struct Point
{
    int x, y;
    Point() {}
    Point(int x, int y) :x(x), y(y) {}
    void read() {
        scanf("%d%d", &x, &y);
    }
    Point operator - (const Point &that) const {
        return Point(x - that.x, y - that.y);
    }
    int operator < (const Point &that) const {
        return x < that.x;
    }
    long long det(const Point &that) const {
        return (long long)x * that.y - (long long)y * that.x;
    }
};

struct ConvexHull
{
    set<Point> a;
    int opt;
    int xl, xr;
    ConvexHull() {}
    void clear() {
        a.clear();
        xl = INF;
        xr = -INF;
    }
    int ok(Point u) {
        if (a.empty()) return false;
        if (u.x < xl) return false;
        if (u.x > xr) return false;
        set<Point>::iterator it = lower_bound(a.begin(), a.end(), u);
        if (it->x == u.x) {
            return (it->y - u.y) * opt >= 0;
        } else {
            set<Point>::iterator l = it, r = it;
            -- l;
            return ((*r) - (*l)).det(u - (*l)) * opt <= 0;
        }
    }
    void insert(Point u) {
        if (ok(u)) return;
        set<Point>::iterator l, r;
        r = lower_bound(a.begin(), a.end(), u);
        for( ; ; ) {
            l = r;
            if (l == a.end()) break;
            ++ r;
            if (r == a.end()) break;
            if ((*l - u).det(*r - u) * opt >= 0) {
                a.erase(l);
            } else break;
        }
        l = lower_bound(a.begin(), a.end(), u);
        if (l != a.end() && l->x == u.x)
            a.erase(l);

        r = lower_bound(a.begin(), a.end(), u);
        if (r != a.begin()) {
            -- r;
            for( ; ; ) {
                l = r;
                if (l == a.begin()) break;
                -- r;
                if ((*l - u).det(*r - u) * opt <= 0) {
                    a.erase(l);
                } else break;
            }
        }
        a.insert(u);
        xl = min(xl, u.x);
        xr = max(xr, u.x);
    }
} up, down;

int q;

void solve()
{
    int t;
    up.clear();
    down.clear();
    up.opt = 1;
    down.opt = -1;
    Point u;
    for( ; q -- ; ) {
        scanf("%d", &t);
        u.read();
        if (t == 1) {
            up.insert(u);
            down.insert(u);
        } else {
            if (up.ok(u) && down.ok(u)) {
                puts("YES");
            } else {
                puts("NO");
            }
        }
    }
}

int main()
{
    for( ; cin >> q; ) {
        solve();
    }
    return 0;
}


#include <set>
#include <map>
#include <queue>
#include <string>
#include <vector>
#include <cmath>
#include <cctype>
#include <cstdio>
#include <cstdlib>
#include <climits>
#include <cstring>
#include <iostream>
#include <cassert>
#include <algorithm>

using namespace std;

#define foreach(e,x) for(__typeof(x.begin()) e=x.begin(); e!=x.end(); ++e)

const int N = 300000 + 10;
const int MOD = 1e9 + 7;
const int INF = 1000000 + 10;

struct Point
{
    int x, y;
    Point() {}
    Point(int x, int y) :x(x), y(y) {}
    void read() {
        scanf("%d%d", &x, &y);
    }
    Point operator - (const Point &that) const {
        return Point(x - that.x, y - that.y);
    }
    int operator < (const Point &that) const {
        return x < that.x;
    }
    long long det(const Point &that) const {
        return (long long)x * that.y - (long long)y * that.x;
    }
};

struct ConvexHull
{
    set<Point> a;
    int opt;
    int xl, xr;
    ConvexHull() {}
    void clear() {
        a.clear();
        xl = INF;
        xr = -INF;
    }
    int ok(Point u) {
        if (a.empty()) return false;
        if (u.x < xl) return false;
        if (u.x > xr) return false;
        set<Point>::iterator it = a.lower_bound(u);
        if (it->x == u.x) {
            return (it->y - u.y) * opt >= 0;
        } else {
            set<Point>::iterator l = it, r = it;
            -- l;
            return ((*r) - (*l)).det(u - (*l)) * opt <= 0;
        }
    }
    void insert(Point u) {
        if (ok(u)) return;
        set<Point>::iterator l, r;
        r = a.lower_bound(u);
        for( ; ; ) {
            l = r;
            if (l == a.end()) break;
            ++ r;
            if (r == a.end()) break;
            if ((*l - u).det(*r - u) * opt >= 0) {
                a.erase(l);
            } else break;
        }
        l = a.lower_bound(u);
        if (l != a.end() && l->x == u.x)
            a.erase(l);

        r = a.lower_bound(u);
        if (r != a.begin()) {
            -- r;
            for( ; ; ) {
                l = r;
                if (l == a.begin()) break;
                -- r;
                if ((*l - u).det(*r - u) * opt <= 0) {
                    a.erase(l);
                } else break;
            }
        }
        a.insert(u);
        xl = min(xl, u.x);
        xr = max(xr, u.x);
    }
} up, down;

int q;

void solve()
{
    int t;
    up.clear();
    down.clear();
    up.opt = 1;
    down.opt = -1;
    Point u;
    for( ; q -- ; ) {
        scanf("%d", &t);
        u.read();
        if (t == 1) {
            up.insert(u);
            down.insert(u);
        } else {
            if (up.ok(u) && down.ok(u)) {
                puts("YES");
            } else {
                puts("NO");
            }
        }
    }
}

int main()
{
    for( ; cin >> q; ) {
        solve();
    }
    return 0;
}


#include <cstdio>
#include <iostream>
#include <string>
#include <map>
#include <set>
#include <vector>
#include <sstream>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#define pb push_back
#define mp make_pair
#define ST begin()
#define ED end()
#define XX first
#define YY second
#define elif else if
#define foreach(i,x) for (__typeof((x).ST) i=(x).ST;i!=(x).ED;++i)
using namespace std;

typedef long long ll;
typedef long double ld;
typedef vector<int> vci;
typedef vector<string> vcs;
typedef pair<int,int> PII;

const double E = 1e-4;

int O(double x)
{
	return (x>E)-(x<-E);
}

struct point
{
	double x,y,d;
	point(double x_=0, double y_=0) : x(x_), y(y_), d(0) {}
};

point operator+(const point &a, const point &b)
{
	return point(a.x+b.x,a.y+b.y);
}

point operator-(const point &a, const point &b)
{
	return point(a.x-b.x,a.y-b.y);
}

point operator*(const point &a, double x)
{
	return point(a.x*x,a.y*x);
}

double operator*(const point &a, const point &b)
{
	return a.x*b.y-a.y*b.x;
}

bool operator<(const point &a, const point &b)
{
	return a.d-b.d<-1e-14;
}

double len(const point &a)
{
	return sqrt(a.x*a.x+a.y*a.y);
}

int n;
set<point> f;
point a[10];

set<point>::iterator pre(set<point>::iterator i)
{
	if (i==f.begin())
		i=f.end();
	--i;
	return i;
}

set<point>::iterator fwd(set<point>::iterator i)
{
	++i;
	if (i==f.end())
		i=f.begin();
	return i;
}

void pr()
{
	return ;
	printf("tot : %d\n", f.size());
	foreach(i,f)
		printf("%.2lf %.2lf\n", i->x, i->y);
//	printf("\n");
}

void add(set<point>::iterator it, point u)
{
	set<point>::iterator it2=pre(it), it3;
	if (O((*it-*it2)*(u-*it2))>=0) return ;
	f.insert(u);
	it=f.lower_bound(u);
	it2=fwd(it);
	it3=fwd(it2);
	while (O((*it3-*it)*(*it2-*it))>=0)
	{
		f.erase(it2);
		it2=it3;
		it3=fwd(it2);
	}
	it2=pre(it);
	it3=pre(it2);
	while (O((*it2-*it)*(*it3-*it))>=0)
	{
		f.erase(it2);
		it2=it3;
		it3=pre(it2);
	}
}

int main()
{
//	freopen("input.txt","r",stdin);
//	freopen("output.txt","w",stdout);

	scanf("%d", &n);
	int x;
	scanf("%d%lf%lf%d%lf%lf%d%lf%lf", &x, &a[1].x, &a[1].y, &x, &a[2].x, &a[2].y, &x, &a[3].x, &a[3].y);
	point o=(a[1]+a[2]+a[3])*(1./3);
	for (int i=1;i<=3;++i)
		a[i].d=atan2(a[i].y-o.y,a[i].x-o.x);
	sort(a+1,a+3+1);
	for (int i=1;i<=3;++i)
		f.insert(a[i]);
	for (int i=4;i<=n;++i)
	{
		int x;
		point u;
		scanf("%d%lf%lf", &x, &u.x, &u.y);
		if (O(u.y-o.y)==0 && O(u.x-o.x)==0)
		{
			if (x==2)
				puts("YES");
			continue;
		}
		u.d=atan2(u.y-o.y,u.x-o.x);
		set<point>::iterator it=f.lower_bound(u);
		if (it!=f.end() && abs(it->d-u.d)<1e-14)
		{
			int fl=O(len(*it-o)-len(u-o));
			if (x==1)
			{
				if (fl<=0)
				{
					f.erase(it);
					it=f.lower_bound(u);
					add(it,u);
				}
			} else
			{
				if (fl>=0)
					puts("YES");
				else
					puts("NO");
			}
			continue;
		}
		if (it==f.end())
			it=f.begin();
		if (x==2)
		{
//			pr();
			set<point>::iterator it2=pre(it);
//			printf("%lf %lf %lf\n%lf %lf %lf\n%lf %lf %lf\n", it->x, it->y, it->d, it2->x, it2->y, it2->d, u.x, u.y, u.d);
//			double y=(*it-*it2)*(u-*it2);
//			printf("%.20lf\n", y);
//			printf("%d : ", i);
			if (O((*it-*it2)*(u-*it2))>=0)
				puts("YES");
			else
				puts("NO");
//			puts("");
		} else
		{
			add(it,u);
			pr();
		}
		/*
		 else
		{

		}*/
	}

	return 0;
}


#include <cstdio>
#include <iostream>
#include <string>
#include <map>
#include <set>
#include <vector>
#include <sstream>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#define pb push_back
#define mp make_pair
#define ST begin()
#define ED end()
#define XX first
#define YY second
#define elif else if
#define foreach(i,x) for (__typeof((x).ST) i=(x).ST;i!=(x).ED;++i)
using namespace std;

typedef long long ll;
typedef long double ld;
typedef vector<int> vci;
typedef vector<string> vcs;
typedef pair<int,int> PII;

const double E = 1e-4;

int O(double x)
{
	return (x>E)-(x<-E);
}

struct point
{
	double x,y,d;
	point(double x_=0, double y_=0) : x(x_), y(y_), d(0) {}
};

point operator+(const point &a, const point &b)
{
	return point(a.x+b.x,a.y+b.y);
}

point operator-(const point &a, const point &b)
{
	return point(a.x-b.x,a.y-b.y);
}

point operator*(const point &a, double x)
{
	return point(a.x*x,a.y*x);
}

double operator*(const point &a, const point &b)
{
	return a.x*b.y-a.y*b.x;
}

bool operator<(const point &a, const point &b)
{
	return a.d-b.d<-1e-14;
}

double len(const point &a)
{
	return sqrt(a.x*a.x+a.y*a.y);
}

int n;
set<point> f;
point a[10];

set<point>::iterator pre(set<point>::iterator i)
{
	if (i==f.begin())
		i=f.end();
	--i;
	return i;
}

set<point>::iterator fwd(set<point>::iterator i)
{
	++i;
	if (i==f.end())
		i=f.begin();
	return i;
}

void pr()
{
	return ;
	printf("tot : %d\n", f.size());
	foreach(i,f)
		printf("%.2lf %.2lf\n", i->x, i->y);
//	printf("\n");
}

void add(set<point>::iterator it, point u)
{
	set<point>::iterator it2=pre(it), it3;
	if (O((*it-*it2)*(u-*it2))>=0) return ;
	f.insert(u);
	it=f.lower_bound(u);
	it2=fwd(it);
	it3=fwd(it2);
	while (O((*it3-*it)*(*it2-*it))>=0)
	{
		f.erase(it2);
		it2=it3;
		it3=fwd(it2);
	}
	it2=pre(it);
	it3=pre(it2);
	while (O((*it2-*it)*(*it3-*it))>=0)
	{
		f.erase(it2);
		it2=it3;
		it3=pre(it2);
	}
}

int main()
{
//	freopen("input.txt","r",stdin);
//	freopen("output.txt","w",stdout);

	scanf("%d", &n);
	int x;
	scanf("%d%lf%lf%d%lf%lf%d%lf%lf", &x, &a[1].x, &a[1].y, &x, &a[2].x, &a[2].y, &x, &a[3].x, &a[3].y);
	point o=(a[1]+a[2]+a[3])*(1./3);
	for (int i=1;i<=3;++i)
		a[i].d=atan2(a[i].y-o.y,a[i].x-o.x);
	sort(a+1,a+3+1);
	for (int i=1;i<=3;++i)
		f.insert(a[i]);
	for (int i=4;i<=n;++i)
	{
		int x;
		point u;
		scanf("%d%lf%lf", &x, &u.x, &u.y);
		if (O(u.y-o.y)==0 && O(u.x-o.x)==0)
		{
			if (x==2)
				puts("NO");
			continue;
		}
		u.d=atan2(u.y-o.y,u.x-o.x);
		set<point>::iterator it=f.lower_bound(u);
		if (it!=f.end() && O(it->d-u.d)==0)
		{
			int fl=O(len(*it-o)-len(u-o));
			if (x==1)
			{
				if (fl<0)
				{
					f.erase(it);
					it=f.lower_bound(u);
					add(it,u);
				}
			} else
			{
				if (fl>0)
					puts("YES");
				else
					puts("NO");
			}
			continue;
		}
		if (it==f.end())
			it=f.begin();
		if (x==2)
		{
//			pr();
			set<point>::iterator it2=pre(it);
//			printf("%lf %lf %lf\n%lf %lf %lf\n%lf %lf %lf\n", it->x, it->y, it->d, it2->x, it2->y, it2->d, u.x, u.y, u.d);
//			double y=(*it-*it2)*(u-*it2);
//			printf("%.20lf\n", y);
//			printf("%d : ", i);
			if (O((*it-*it2)*(u-*it2))>=0)
				puts("YES");
			else
				puts("NO");
//			puts("");
		} else
		{
			add(it,u);
			pr();
		}
		/*
		 else
		{

		}*/
	}

	return 0;
}


#include <cstdio>
#include <iostream>
#include <string>
#include <map>
#include <set>
#include <vector>
#include <sstream>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#define pb push_back
#define mp make_pair
#define ST begin()
#define ED end()
#define XX first
#define YY second
#define elif else if
#define foreach(i,x) for (__typeof((x).ST) i=(x).ST;i!=(x).ED;++i)
using namespace std;

typedef long long ll;
typedef long double ld;
typedef vector<int> vci;
typedef vector<string> vcs;
typedef pair<int,int> PII;

const double E = 1e-6;

int O(double x)
{
	return (x>E)-(x<-E);
}

struct point
{
	double x,y,d;
	point(double x_=0, double y_=0) : x(x_), y(y_), d(0) {}
};

point operator+(const point &a, const point &b)
{
	return point(a.x+b.x,a.y+b.y);
}

point operator-(const point &a, const point &b)
{
	return point(a.x-b.x,a.y-b.y);
}

point operator*(const point &a, double x)
{
	return point(a.x*x,a.y*x);
}

double operator*(const point &a, const point &b)
{
	return a.x*b.y-a.y*b.x;
}

bool operator<(const point &a, const point &b)
{
	return a.d-b.d<-1e-12;
}

int n;
set<point> f;
point a[10];

set<point>::iterator pre(set<point>::iterator i)
{
	if (i==f.begin())
		i=f.end();
	--i;
	return i;
}

set<point>::iterator fwd(set<point>::iterator i)
{
	++i;
	if (i==f.end())
		i=f.begin();
	return i;
}

void pr()
{
	return ;
	printf("tot : %d\n", f.size());
	foreach(i,f)
		printf("%.2lf %.2lf\n", i->x, i->y);
	printf("\n");
}

int main()
{
//	freopen("input.txt","r",stdin);
//	freopen("output.txt","w",stdout);

	scanf("%d", &n);
	int x;
	scanf("%d%lf%lf%d%lf%lf%d%lf%lf", &x, &a[1].x, &a[1].y, &x, &a[2].x, &a[2].y, &x, &a[3].x, &a[3].y);
	point o=(a[1]+a[2]+a[3])*(1./3);
	for (int i=1;i<=3;++i)
		a[i].d=atan2(a[i].y-o.y,a[i].x-o.x);
	sort(a+1,a+3+1);
	for (int i=1;i<=3;++i)
		f.insert(a[i]);
	for (int i=4;i<=n;++i)
	{
		int x;
		point u;
		scanf("%d%lf%lf", &x, &u.x, &u.y);
		if (O(u.y-o.y)==0 && O(u.x-o.x)==0)
		{
			if (x==2)
				puts("NO");
			continue;
		}
		u.d=atan2(u.y-o.y,u.x-o.x);
		set<point>::iterator it=f.upper_bound(u);
		if (it==f.end())
			it=f.begin();
		if (x==2)
		{
			pr();
			set<point>::iterator it2=pre(it);
			if (O((*it-*it2)*(u-*it2))>=0)
				puts("YES");
			else
				puts("NO");
		} else
		{
			set<point>::iterator it2=pre(it), it3;
			if (O((*it-*it2)*(u-*it2))>=0) continue;
			f.insert(u);
			it=f.lower_bound(u);
			it2=fwd(it);
			it3=fwd(it2);
			while (O((*it3-*it)*(*it2-*it))>=0)
			{
				f.erase(it2);
				it2=it3;
				it3=fwd(it2);
			}
			it2=pre(it);
			it3=pre(it2);
			while (O((*it2-*it)*(*it3-*it))>=0)
			{
				f.erase(it2);
				it2=it3;
				it3=pre(it2);
			}
			pr();
		}
		/*
		if (it!=f.end() && O(it->d-u.d)==0)
		{
			int fl=O(len(*it)-len(u));
			if (x==1)
			{
				if (fl<0)
					add(it,u);
			} else
			{
				if (fl>0)
					puts("YES");
				else
					puts("NO");
			}
		} else
		{

		}*/
	}

	return 0;
}


#include <cstdio>
#include <iostream>
#include <string>
#include <map>
#include <set>
#include <vector>
#include <sstream>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#define pb push_back
#define mp make_pair
#define ST begin()
#define ED end()
#define XX first
#define YY second
#define elif else if
#define foreach(i,x) for (__typeof((x).ST) i=(x).ST;i!=(x).ED;++i)
using namespace std;

typedef long long ll;
typedef long double ld;
typedef vector<int> vci;
typedef vector<string> vcs;
typedef pair<int,int> PII;

const double E = 1e-4;

int O(double x)
{
	return (x>E)-(x<-E);
}

struct point
{
	double x,y,d;
	point(double x_=0, double y_=0) : x(x_), y(y_), d(0) {}
};

point operator+(const point &a, const point &b)
{
	return point(a.x+b.x,a.y+b.y);
}

point operator-(const point &a, const point &b)
{
	return point(a.x-b.x,a.y-b.y);
}

point operator*(const point &a, double x)
{
	return point(a.x*x,a.y*x);
}

double operator*(const point &a, const point &b)
{
	return a.x*b.y-a.y*b.x;
}

bool operator<(const point &a, const point &b)
{
	return a.d-b.d<-1e-14;
}

double len(const point &a)
{
	return sqrt(a.x*a.x+a.y*a.y);
}

int n;
set<point> f;
point a[10];

set<point>::iterator pre(set<point>::iterator i)
{
	if (i==f.begin())
		i=f.end();
	--i;
	return i;
}

set<point>::iterator fwd(set<point>::iterator i)
{
	++i;
	if (i==f.end())
		i=f.begin();
	return i;
}

void pr()
{
	return ;
	printf("tot : %d\n", f.size());
	foreach(i,f)
		printf("%.2lf %.2lf\n", i->x, i->y);
//	printf("\n");
}

void add(set<point>::iterator it, point u)
{
	set<point>::iterator it2=pre(it), it3;
	if (O((*it-*it2)*(u-*it2))>=0) return ;
	f.insert(u);
	it=f.lower_bound(u);
	it2=fwd(it);
	it3=fwd(it2);
	while (O((*it3-*it)*(*it2-*it))>=0)
	{
		f.erase(it2);
		it2=it3;
		it3=fwd(it2);
	}
	it2=pre(it);
	it3=pre(it2);
	while (O((*it2-*it)*(*it3-*it))>=0)
	{
		f.erase(it2);
		it2=it3;
		it3=pre(it2);
	}
}

int main()
{
//	freopen("input.txt","r",stdin);
//	freopen("output.txt","w",stdout);

	scanf("%d", &n);
	int x;
	scanf("%d%lf%lf%d%lf%lf%d%lf%lf", &x, &a[1].x, &a[1].y, &x, &a[2].x, &a[2].y, &x, &a[3].x, &a[3].y);
	point o=(a[1]+a[2]+a[3])*(1./3);
	for (int i=1;i<=3;++i)
		a[i].d=atan2(a[i].y-o.y,a[i].x-o.x);
	sort(a+1,a+3+1);
	for (int i=1;i<=3;++i)
		f.insert(a[i]);
	for (int i=4;i<=n;++i)
	{
		int x;
		point u;
		scanf("%d%lf%lf", &x, &u.x, &u.y);
		if (O(u.y-o.y)==0 && O(u.x-o.x)==0)
		{
			if (x==2)
				puts("NO");
			continue;
		}
		u.d=atan2(u.y-o.y,u.x-o.x);
		set<point>::iterator it=f.lower_bound(u);
		if (it!=f.end() && O(it->d-u.d)==0)
		{
			int fl=O(len(*it-o)-len(u-o));
			if (x==1)
			{
				if (fl<=0)
				{
					f.erase(it);
					it=f.lower_bound(u);
					add(it,u);
				}
			} else
			{
				if (fl>=0)
					puts("YES");
				else
					puts("NO");
			}
			continue;
		}
		if (it==f.end())
			it=f.begin();
		if (x==2)
		{
//			pr();
			set<point>::iterator it2=pre(it);
//			printf("%lf %lf %lf\n%lf %lf %lf\n%lf %lf %lf\n", it->x, it->y, it->d, it2->x, it2->y, it2->d, u.x, u.y, u.d);
//			double y=(*it-*it2)*(u-*it2);
//			printf("%.20lf\n", y);
//			printf("%d : ", i);
			if (O((*it-*it2)*(u-*it2))>=0)
				puts("YES");
			else
				puts("NO");
//			puts("");
		} else
		{
			add(it,u);
			pr();
		}
		/*
		 else
		{

		}*/
	}

	return 0;
}


#include <cstdio>
#include <iostream>
#include <string>
#include <map>
#include <set>
#include <vector>
#include <sstream>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#define pb push_back
#define mp make_pair
#define ST begin()
#define ED end()
#define XX first
#define YY second
#define elif else if
#define foreach(i,x) for (__typeof((x).ST) i=(x).ST;i!=(x).ED;++i)
using namespace std;

typedef long long ll;
typedef long double ld;
typedef vector<int> vci;
typedef vector<string> vcs;
typedef pair<int,int> PII;

const double E = 1e-4;

int O(double x)
{
	return (x>E)-(x<-E);
}

struct point
{
	double x,y,d;
	point(double x_=0, double y_=0) : x(x_), y(y_), d(0) {}
};

point operator+(const point &a, const point &b)
{
	return point(a.x+b.x,a.y+b.y);
}

point operator-(const point &a, const point &b)
{
	return point(a.x-b.x,a.y-b.y);
}

point operator*(const point &a, double x)
{
	return point(a.x*x,a.y*x);
}

double operator*(const point &a, const point &b)
{
	return a.x*b.y-a.y*b.x;
}

bool operator<(const point &a, const point &b)
{
	return a.d-b.d<-1e-14;
}

double len(const point &a)
{
	return sqrt(a.x*a.x+a.y*a.y);
}

int n;
set<point> f;
point a[10];

set<point>::iterator pre(set<point>::iterator i)
{
	if (i==f.begin())
		i=f.end();
	--i;
	return i;
}

set<point>::iterator fwd(set<point>::iterator i)
{
	++i;
	if (i==f.end())
		i=f.begin();
	return i;
}

void pr()
{
	return ;
	printf("tot : %d\n", f.size());
	foreach(i,f)
		printf("%.2lf %.2lf\n", i->x, i->y);
//	printf("\n");
}

void add(set<point>::iterator it, point u)
{
	set<point>::iterator it2=pre(it), it3;
	if (O((*it-*it2)*(u-*it2))>=0) return ;
	f.insert(u);
	it=f.lower_bound(u);
	it2=fwd(it);
	it3=fwd(it2);
	while (O((*it3-*it)*(*it2-*it))>=0)
	{
		f.erase(it2);
		it2=it3;
		it3=fwd(it2);
	}
	it2=pre(it);
	it3=pre(it2);
	while (O((*it2-*it)*(*it3-*it))>=0)
	{
		f.erase(it2);
		it2=it3;
		it3=pre(it2);
	}
}

int main()
{
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);

	scanf("%d", &n);
	int x;
	scanf("%d%lf%lf%d%lf%lf%d%lf%lf", &x, &a[1].x, &a[1].y, &x, &a[2].x, &a[2].y, &x, &a[3].x, &a[3].y);
	point o=(a[1]+a[2]+a[3])*(1./3);
	for (int i=1;i<=3;++i)
		a[i].d=atan2(a[i].y-o.y,a[i].x-o.x);
	sort(a+1,a+3+1);
	for (int i=1;i<=3;++i)
		f.insert(a[i]);
	for (int i=4;i<=n;++i)
	{
		int x;
		point u;
		scanf("%d%lf%lf", &x, &u.x, &u.y);
		if (O(u.y-o.y)==0 && O(u.x-o.x)==0)
		{
			if (x==2)
				puts("NO");
			continue;
		}
		u.d=atan2(u.y-o.y,u.x-o.x);
		set<point>::iterator it=f.lower_bound(u);
		if (it!=f.end() && O(it->d-u.d)==0)
		{
			int fl=O(len(*it-o)-len(u-o));
			if (x==1)
			{
				if (fl<0)
				{
					f.erase(it);
					it=f.lower_bound(u);
					add(it,u);
				}
			} else
			{
				if (fl>0)
					puts("YES");
				else
					puts("NO");
			}
			continue;
		}
		if (it==f.end())
			it=f.begin();
		if (x==2)
		{
//			pr();
			set<point>::iterator it2=pre(it);
//			printf("%lf %lf %lf\n%lf %lf %lf\n%lf %lf %lf\n", it->x, it->y, it->d, it2->x, it2->y, it2->d, u.x, u.y, u.d);
//			double y=(*it-*it2)*(u-*it2);
//			printf("%.20lf\n", y);
//			printf("%d : ", i);
			if (O((*it-*it2)*(u-*it2))>=0)
				puts("YES");
			else
				puts("NO");
//			puts("");
		} else
		{
			add(it,u);
			pr();
		}
		/*
		 else
		{

		}*/
	}

	return 0;
}


#include <cstdio>
#include <iostream>
#include <string>
#include <map>
#include <set>
#include <vector>
#include <sstream>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#define pb push_back
#define mp make_pair
#define ST begin()
#define ED end()
#define XX first
#define YY second
#define elif else if
#define foreach(i,x) for (__typeof((x).ST) i=(x).ST;i!=(x).ED;++i)
using namespace std;

typedef long long ll;
typedef long double ld;
typedef vector<int> vci;
typedef vector<string> vcs;
typedef pair<int,int> PII;

const double E = 1e-4;

int O(double x)
{
	return (x>E)-(x<-E);
}

struct point
{
	double x,y,d;
	point(double x_=0, double y_=0) : x(x_), y(y_), d(0) {}
};

point operator+(const point &a, const point &b)
{
	return point(a.x+b.x,a.y+b.y);
}

point operator-(const point &a, const point &b)
{
	return point(a.x-b.x,a.y-b.y);
}

point operator*(const point &a, double x)
{
	return point(a.x*x,a.y*x);
}

double operator*(const point &a, const point &b)
{
	return a.x*b.y-a.y*b.x;
}

bool operator<(const point &a, const point &b)
{
	return a.d-b.d<-1e-14;
}

int n;
set<point> f;
point a[10];

set<point>::iterator pre(set<point>::iterator i)
{
	if (i==f.begin())
		i=f.end();
	--i;
	return i;
}

set<point>::iterator fwd(set<point>::iterator i)
{
	++i;
	if (i==f.end())
		i=f.begin();
	return i;
}

void pr()
{
	return ;
	printf("tot : %d\n", f.size());
	foreach(i,f)
		printf("%.2lf %.2lf\n", i->x, i->y);
//	printf("\n");
}

int main()
{
//	freopen("input.txt","r",stdin);
//	freopen("output.txt","w",stdout);

	scanf("%d", &n);
	int x;
	scanf("%d%lf%lf%d%lf%lf%d%lf%lf", &x, &a[1].x, &a[1].y, &x, &a[2].x, &a[2].y, &x, &a[3].x, &a[3].y);
	point o=(a[1]+a[2]+a[3])*(1./3);
	for (int i=1;i<=3;++i)
		a[i].d=atan2(a[i].y-o.y,a[i].x-o.x);
	sort(a+1,a+3+1);
	for (int i=1;i<=3;++i)
		f.insert(a[i]);
	for (int i=4;i<=n;++i)
	{
		int x;
		point u;
		scanf("%d%lf%lf", &x, &u.x, &u.y);
		if (O(u.y-o.y)==0 && O(u.x-o.x)==0)
		{
			if (x==2)
				puts("NO");
			continue;
		}
		u.d=atan2(u.y-o.y,u.x-o.x);
		set<point>::iterator it=f.upper_bound(u);
		if (it==f.end())
			it=f.begin();
		if (x==2)
		{
			pr();
			set<point>::iterator it2=pre(it);
//			printf("%lf %lf %lf\n%lf %lf %lf\n%lf %lf %lf\n", it->x, it->y, it->d, it2->x, it2->y, it2->d, u.x, u.y, u.d);
//			double y=(*it-*it2)*(u-*it2);
//			printf("%.20lf\n", y);
			if (O((*it-*it2)*(u-*it2))>=0)
				puts("YES");
			else
				puts("NO");
		} else
		{
			set<point>::iterator it2=pre(it), it3;
			if (O((*it-*it2)*(u-*it2))>=0) continue;
			f.insert(u);
			it=f.lower_bound(u);
			it2=fwd(it);
			it3=fwd(it2);
			while (O((*it3-*it)*(*it2-*it))>=0)
			{
				f.erase(it2);
				it2=it3;
				it3=fwd(it2);
			}
			it2=pre(it);
			it3=pre(it2);
			while (O((*it2-*it)*(*it3-*it))>=0)
			{
				f.erase(it2);
				it2=it3;
				it3=pre(it2);
			}
			pr();
		}
		/*
		if (it!=f.end() && O(it->d-u.d)==0)
		{
			int fl=O(len(*it)-len(u));
			if (x==1)
			{
				if (fl<0)
					add(it,u);
			} else
			{
				if (fl>0)
					puts("YES");
				else
					puts("NO");
			}
		} else
		{

		}*/
	}

	return 0;
}


#include <cstdio>
#include <iostream>
#include <string>
#include <map>
#include <set>
#include <vector>
#include <sstream>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#define pb push_back
#define mp make_pair
#define ST begin()
#define ED end()
#define XX first
#define YY second
#define elif else if
#define foreach(i,x) for (__typeof((x).ST) i=(x).ST;i!=(x).ED;++i)
using namespace std;

typedef long long ll;
typedef long double ld;
typedef vector<int> vci;
typedef vector<string> vcs;
typedef pair<int,int> PII;

const double E = 1e-4;

int O(double x)
{
	return (x>E)-(x<-E);
}

struct point
{
	double x,y,d;
	point(double x_=0, double y_=0) : x(x_), y(y_), d(0) {}
};

point operator+(const point &a, const point &b)
{
	return point(a.x+b.x,a.y+b.y);
}

point operator-(const point &a, const point &b)
{
	return point(a.x-b.x,a.y-b.y);
}

point operator*(const point &a, double x)
{
	return point(a.x*x,a.y*x);
}

double operator*(const point &a, const point &b)
{
	return a.x*b.y-a.y*b.x;
}

bool operator<(const point &a, const point &b)
{
	return a.d-b.d<-1e-14;
}

double len(const point &a)
{
	return sqrt(a.x*a.x+a.y*a.y);
}

int n;
set<point> f;
point a[10];

set<point>::iterator pre(set<point>::iterator i)
{
	if (i==f.begin())
		i=f.end();
	--i;
	return i;
}

set<point>::iterator fwd(set<point>::iterator i)
{
	++i;
	if (i==f.end())
		i=f.begin();
	return i;
}

void pr()
{
	return ;
	printf("tot : %d\n", f.size());
	foreach(i,f)
		printf("%.2lf %.2lf\n", i->x, i->y);
//	printf("\n");
}

void add(set<point>::iterator it, point u)
{
	set<point>::iterator it2=pre(it), it3;
	if (O((*it-*it2)*(u-*it2))>=0) return ;
	f.insert(u);
	it=f.lower_bound(u);
	it2=fwd(it);
	it3=fwd(it2);
	while (O((*it3-*it)*(*it2-*it))>=0)
	{
		f.erase(it2);
		it2=it3;
		it3=fwd(it2);
	}
	it2=pre(it);
	it3=pre(it2);
	while (O((*it2-*it)*(*it3-*it))>=0)
	{
		f.erase(it2);
		it2=it3;
		it3=pre(it2);
	}
}

int main()
{
//	freopen("input.txt","r",stdin);
//	freopen("output.txt","w",stdout);

	scanf("%d", &n);
	int x;
	scanf("%d%lf%lf%d%lf%lf%d%lf%lf", &x, &a[1].x, &a[1].y, &x, &a[2].x, &a[2].y, &x, &a[3].x, &a[3].y);
	point o=(a[1]+a[2]+a[3])*(1./3);
	for (int i=1;i<=3;++i)
		a[i].d=atan2(a[i].y-o.y,a[i].x-o.x);
	sort(a+1,a+3+1);
	for (int i=1;i<=3;++i)
		f.insert(a[i]);
	for (int i=4;i<=n;++i)
	{
		int x;
		point u;
		scanf("%d%lf%lf", &x, &u.x, &u.y);
		if (O(u.y-o.y)==0 && O(u.x-o.x)==0)
		{
			if (x==2)
				puts("NO");
			continue;
		}
		u.d=atan2(u.y-o.y,u.x-o.x);
		set<point>::iterator it=f.lower_bound(u);
		if (it!=f.end() && abs(it->d-u.d)<1e-14)
		{
			int fl=O(len(*it-o)-len(u-o));
			if (x==1)
			{
				if (fl<=0)
				{
					f.erase(it);
					it=f.lower_bound(u);
					add(it,u);
				}
			} else
			{
				if (fl>=0)
					puts("YES");
				else
					puts("NO");
			}
			continue;
		}
		if (it==f.end())
			it=f.begin();
		if (x==2)
		{
//			pr();
			set<point>::iterator it2=pre(it);
//			printf("%lf %lf %lf\n%lf %lf %lf\n%lf %lf %lf\n", it->x, it->y, it->d, it2->x, it2->y, it2->d, u.x, u.y, u.d);
//			double y=(*it-*it2)*(u-*it2);
//			printf("%.20lf\n", y);
//			printf("%d : ", i);
			if (O((*it-*it2)*(u-*it2))>=0)
				puts("YES");
			else
				puts("NO");
//			puts("");
		} else
		{
			add(it,u);
			pr();
		}
		/*
		 else
		{

		}*/
	}

	return 0;
}


#include <set>
#include <cstdio>

typedef long long ll;

struct point {
	int x, y;
	point() {}
	point( int x, int y ): x(x), y(y) {}
	bool operator < ( const point& rhs ) const {
		return x < rhs.x;
	}
	inline point operator - ( const point& rhs ) const {
		return point( x-rhs.x, y-rhs.y );
	}
};

inline ll cross( const point& a, const point& b ) {
	return a.x*b.y - a.y*b.x;
}

typedef std::set<point> SP;
typedef SP::iterator SPI;

bool onleft( const point& a, const point& b, const point& p ) {
	return cross(b-a,p-a) >= 0;
}

struct Dynamic_Convex {
	SP S;
	Dynamic_Convex () {}
	void insert( point p ) {
		SPI q = S.lower_bound( p ), t, k;
		if( q == S.end() ) {
		} else if( q->x == p.x ) {
			if( p.y > q->y ) {
				S.erase( q );
			} else return ;
		} else if( q == S.begin() ) {
			S.insert(p);
		} else {
			t = q; t--;
			if(onleft(*q,*t,p)) return;
		}
		S.insert(p);
		q = S.lower_bound(p); t = q;
		if( t != S.begin() ) t--;
		while ( t != S.begin() ) {
			k = t; k --;
			if( onleft(p,*k,*t) ) {
				S.erase(t);
			} else break;
			t = k;
		}
		t = q; t ++;
		while ( t != S.end() ) {
			k = t; k ++;
			if( k != S.end() && onleft(*k,p,*t) ) {
				S.erase(t);
			} else break;
			t = k;
		}
	}
	bool query( point p ) {
		SPI q = S.lower_bound(p), t;
		if( q == S.end() ) return false;
		if( q->x == p.x ) return q->y >= p.y;
		if( q == S.begin() ) return false;
		t = q; t --;
		printf( "%d %d\n", q->x, q->y );
		printf( "%d %d\n", t->x, t->y );
		printf( "%d %d\n", p.x, p.y );
		return onleft(*q,*t,p);
	}
};

struct Dynamic_Convex_Hull {
	Dynamic_Convex up, down;
	Dynamic_Convex_Hull() {}
	void insert( int x, int y ) {
		up.insert( point(x, y) );
		down.insert( point(x, -y) );
	}
	bool query( int x, int y ) {
		return up.query( point(x, y) ) && down.query( point(x, -y) );
	}
} S;

int main() {
	int n;
	scanf( "%d", &n );
	for( int i = 0, t, x, y; i < n; i ++ ) {
		scanf( "%d%d%d", &t, &x, &y );
		if( t == 1 ) S.insert(x,y);
		else {
			if( S.query(x,y) ) printf( "YES\n" );
			else printf( "NO\n" );
		}
	}
	return 0;
}


#include <set>
#include <cstdio>

typedef long long ll;

struct point {
	int x, y;
	point() {}
	point( int x, int y ): x(x), y(y) {}
	bool operator < ( const point& rhs ) const {
		return x < rhs.x;
	}
	inline point operator - ( const point& rhs ) const {
		return point( x-rhs.x, y-rhs.y );
	}
};

inline ll cross( const point& a, const point& b ) {
	return a.x*b.y - a.y*b.x;
}

typedef std::set<point> SP;
typedef SP::iterator SPI;

bool onleft( const point& a, const point& b, const point& p ) {
	return cross(b-a,p-a) >= 0;
}

struct Dynamic_Convex {
	SP S;
	Dynamic_Convex () {}
	void insert( point p ) {
		SPI q = S.lower_bound( p ), t, k;
		if( q == S.end() ) {
			S.insert(p); return;
		} else if( q->x == p.x ) {
			if( p.y > q->y ) {
				S.erase( q );
			} else return ;
		} else if( q == S.begin() ) {
			S.insert(p);
		} else {
			t = q; t--;
			if(onleft(*q,*t,p)) return;
		}
		S.insert(p);
		q = S.lower_bound(p); t = q;
		if( t != S.begin() ) t--;
		while ( t != S.begin() ) {
			k = t; k --;
			if( onleft(p,*k,*t) ) {
				S.erase(t);
			} else break;
			t = k;
		}
		t = q; t ++;
		while ( t != S.end() ) {
			k = t; k ++;
			if( k != S.end() && onleft(*k,p,*t) ) {
				S.erase(t);
			} else break;
			t = k;
		}
	}
	bool query( point p ) {
		SPI q = S.lower_bound(p), t;
		if( q == S.end() ) return false;
		if( q->x == p.x ) return q->y >= p.y;
		if( q == S.begin() ) return false;
		t = q; t --;
		return onleft(*q,*t,p);
	}
};

struct Dynamic_Convex_Hull {
	Dynamic_Convex up, down;
	Dynamic_Convex_Hull() {}
	void insert( int x, int y ) {
		up.insert( point(x, y) );
		down.insert( point(x, -y) );
	}
	bool query( int x, int y ) {
		return up.query( point(x, y) ) && down.query( point(x, -y) );
	}
} S;

int main() {
	int n;
	scanf( "%d", &n );
	for( int i = 0, t, x, y; i < n; i ++ ) {
		scanf( "%d%d%d", &t, &x, &y );
		if( t == 1 ) S.insert(x,y);
		else {
			if( S.query(x,y) ) printf( "YES\n" );
			else printf( "NO\n" );
		}
	}
	return 0;
}


#include <set>
#include <cstdio>

typedef long long ll;

struct point {
	int x, y;
	point() {}
	point( int x, int y ): x(x), y(y) {}
	bool operator < ( const point& rhs ) const {
		return x < rhs.x;
	}
	inline point operator - ( const point& rhs ) const {
		return point( x-rhs.x, y-rhs.y );
	}
};

inline ll cross( const point& a, const point& b ) {
	return a.x*b.y - a.y*b.x;
}

typedef std::set<point> SP;
typedef SP::iterator SPI;

bool onleft( const point& a, const point& b, const point& p ) {
	return cross(b-a,p-a) >= 0;
}

struct Dynamic_Convex {
	SP S;
	Dynamic_Convex () {}
	void insert( point p ) {
		SPI q = S.lower_bound( p ), t, k;
		if( q == S.end() ) {
		} else if( q->x == p.x ) {
			if( p.y > q->y ) {
				S.erase( q );
			} else return ;
		} else if( q == S.begin() ) {
			S.insert(p);
		} else {
			t = q; t--;
			if(onleft(*q,*t,p)) return;
		}
		S.insert(p);
		q = S.lower_bound(p); t = q;
		if( t != S.begin() ) t--;
		while ( t != S.begin() ) {
			k = t; k --;
			if( onleft(p,*k,*t) ) {
				S.erase(t);
			} else break;
			t = k;
		}
		t = q; t ++;
		while ( t != S.end() ) {
			k = t; k ++;
			if( k != S.end() && onleft(*k,p,*t) ) {
				S.erase(t);
			} else break;
			t = k;
		}
	}
	bool query( point p ) {
		SPI q = S.lower_bound(p), t;
		if( q == S.end() ) return false;
		if( q->x == p.x ) return q->y >= p.y;
		if( q == S.begin() ) return false;
		t = q; t --;
		return onleft(*q,*t,p);
	}
};

struct Dynamic_Convex_Hull {
	Dynamic_Convex up, down;
	Dynamic_Convex_Hull() {}
	void insert( int x, int y ) {
		up.insert( point(x, y) );
		down.insert( point(x, -y) );
	}
	bool query( int x, int y ) {
		return up.query( point(x, y) ) && down.query( point(x, -y) );
	}
} S;

int main() {
	int n;
	scanf( "%d", &n );
	for( int i = 0, t, x, y; i < n; i ++ ) {
		scanf( "%d%d%d", &t, &x, &y );
		if( t == 1 ) S.insert(x,y);
		else {
			if( S.query(x,y) ) printf( "YES\n" );
			else printf( "NO\n" );
		}
	}
	return 0;
}


#include <set>
#include <cstdio>

typedef long long ll;

struct point {
	int x, y;
	point() {}
	point( int x, int y ): x(x), y(y) {}
	bool operator < ( const point& rhs ) const {
		return x < rhs.x;
	}
	inline point operator - ( const point& rhs ) const {
		return point( x-rhs.x, y-rhs.y );
	}
};

inline ll cross( const point& a, const point& b ) {
	return 1ll*a.x*b.y - 1ll*a.y*b.x;
}

typedef std::set<point> SP;
typedef SP::iterator SPI;

bool onleft( const point& a, const point& b, const point& p ) {
	return cross(b-a,p-a) >= 0;
}

struct Dynamic_Convex {
	SP S;
	Dynamic_Convex () {}
	void insert( point p ) {
		SPI q = S.lower_bound( p ), t, k;
		if( q == S.end() ) {
		} else if( q->x == p.x ) {
			if( p.y > q->y ) {
				S.erase( q );
			} else return ;
		} else if( q == S.begin() ) {
			S.insert(p);
		} else {
			t = q; t--;
			if(onleft(*q,*t,p)) return;
		}
		S.insert(p);
		q = S.lower_bound(p); t = q;
		if( t != S.begin() ) t--;
		while ( t != S.begin() ) {
			k = t; k --;
			if( onleft(p,*k,*t) ) {
				S.erase(t);
			} else break;
			t = k;
		}
		t = q; t ++;
		while ( t != S.end() ) {
			k = t; k ++;
			if( k != S.end() && onleft(*k,p,*t) ) {
				S.erase(t);
			} else break;
			t = k;
		}
	}
	bool query( point p ) {
		SPI q = S.lower_bound(p), t;
		if( q == S.end() ) return false;
		if( q->x == p.x ) return q->y >= p.y;
		if( q == S.begin() ) return false;
		t = q; t --;
		return onleft(*q,*t,p);
	}
};

struct Dynamic_Convex_Hull {
	Dynamic_Convex up, down;
	Dynamic_Convex_Hull() {}
	void insert( int x, int y ) {
		up.insert( point(x, y) );
		down.insert( point(x, -y) );
	}
	bool query( int x, int y ) {
		return up.query( point(x, y) ) && down.query( point(x, -y) );
	}
} S;

int main() {
	int n;
	scanf( "%d", &n );
	for( int i = 0, t, x, y; i < n; i ++ ) {
		scanf( "%d%d%d", &t, &x, &y );
		if( t == 1 ) S.insert(x,y);
		else {
			if( S.query(x,y) ) printf( "YES\n" );
			else printf( "NO\n" );
		}
	}
	return 0;
}


#include <set>
#include <cstdio>

typedef long long ll;

struct point {
	int x, y;
	point() {}
	point( int x, int y ): x(x), y(y) {}
	bool operator < ( const point& rhs ) const {
		return x < rhs.x;
	}
	inline point operator - ( const point& rhs ) const {
		return point( x-rhs.x, y-rhs.y );
	}
};

inline ll cross( const point& a, const point& b ) {
	return a.x*b.y - a.y*b.x;
}

typedef std::set<point> SP;
typedef SP::iterator SPI;

bool onleft( const point& a, const point& b, const point& p ) {
	return cross(b-a,p-a) >= 0;
}

struct Dynamic_Convex {
	SP S;
	Dynamic_Convex () {}
	void insert( point p ) {
		SPI q = S.lower_bound( p ), t, k;
		if( q == S.end() ) {
			S.insert(p); return;
		} else if( q->x == p.x ) {
			if( p.y > q->y ) {
				S.erase( q );
			} else return ;
		} else if( q == S.begin() ) {
			S.insert(p);
		} else {
			t = q; t--;
			if(onleft(*q,*t,p)) return;
		}
		S.insert(p);
		q = S.lower_bound(p); t = q;
		if( t != S.begin() ) t--;
		while ( t != S.begin() ) {
			k = t; k --;
			if( onleft(p,*k,*t) ) {
				S.erase(t);
			} else break;
			t = k;
		}
		t = q; t ++;
		while ( t != S.end() ) {
			k = t; k ++;
			if( k != S.end() && onleft(*k,p,*t) ) {
				S.erase(t);
			} else break;
			t = k;
		}
	}
	bool query( point p ) {
		SPI q = S.lower_bound(p), t;
		if( q == S.end() ) return false;
		if( q->x == p.x ) return q->x >= p.x;
		if( q == S.begin() ) return false;
		t = q; t --;
		return onleft(*q,*t,p);
	}
};

struct Dynamic_Convex_Hull {
	Dynamic_Convex up, down;
	Dynamic_Convex_Hull() {}
	void insert( int x, int y ) {
		up.insert( point(x, y) );
		down.insert( point(x, -y) );
	}
	bool query( int x, int y ) {
		return up.query( point(x, y) ) && down.query( point(x, -y) );
	}
} S;

int main() {
	int n;
	scanf( "%d", &n );
	for( int i = 0, t, x, y; i < n; i ++ ) {
		scanf( "%d%d%d", &t, &x, &y );
		if( t == 1 ) S.insert(x,y);
		else {
			if( S.query(x,y) ) printf( "YES\n" );
			else printf( "NO\n" );
		}
	}
	return 0;
}


#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<set>
#include<cmath>
#include<cctype>

using namespace std;

const int BUF_SIZE = 30;
char buf[BUF_SIZE], *buf_s = buf, *buf_t = buf + 1;

#define PTR_NEXT() \
    { \
        buf_s ++; \
        if (buf_s == buf_t) \
        { \
            buf_s = buf; \
            buf_t = buf + fread(buf, 1, BUF_SIZE, stdin); \
        } \
    }

#define readlonglong(_n_) \
    { \
        while (*buf_s != '-' && !isdigit(*buf_s)) \
            PTR_NEXT(); \
        bool register _nega_ = false; \
        if (*buf_s == '-') \
        { \
            _nega_ = true; \
            PTR_NEXT(); \
        } \
        long long register _x_ = 0; \
        while (isdigit(*buf_s)) \
        { \
            _x_ = _x_ * 10 + *buf_s - '0'; \
            PTR_NEXT(); \
        } \
        if (_nega_) \
            _x_ = -_x_; \
        (_n_) = (_x_); \
    }

#define readint(_n_) \
    { \
        while (*buf_s != '-' && !isdigit(*buf_s)) \
            PTR_NEXT(); \
        bool register _nega_ = false; \
        if (*buf_s == '-') \
        { \
            _nega_ = true; \
            PTR_NEXT(); \
        } \
        int register _x_ = 0; \
        while (isdigit(*buf_s)) \
        { \
            _x_ = _x_ * 10 + *buf_s - '0'; \
            PTR_NEXT(); \
        } \
        if (_nega_) \
            _x_ = -_x_; \
        (_n_) = (_x_); \
    }

const double eps=1e-10;

int n;

long long s;

struct point
{
	long long x,y;
	double v;
	point(){}
	point(long long a,long long b)
	{
		x=a;y=b;
	}
	void calc()
	{
		v=atan2(y,x);
	}
	void init()
	{
		readlonglong(x);
		readlonglong(y);
	}
	point operator-(const point &a)
	{
		return point(x-a.x,y-a.y);
	}
	long long operator*(const point &a)
	{
		return x*a.y-y*a.x;
	}
	bool operator<(const point &a)const
	{
		return v-eps>a.v;
	}
}mid;

set<point> hull;

void pre()
{
	int opt;
	point p1,p2,p3;
	readint(opt);
	p1.init();
	readint(opt);
	p2.init();
	readint(opt);
	p3.init();
	mid=point((p1.x+p2.x+p3.x)/3,(p1.y+p2.y+p3.y)/3);
	p1=p1-mid;p1.calc();hull.insert(p1);
	p2=p2-mid;p2.calc();hull.insert(p2);
	p3=p3-mid;p3.calc();hull.insert(p3);
	s=abs((p2-p1)*(p3-p1));
}

point prev(point p)
{
	set<point>::iterator a=hull.lower_bound(p);
	if (a==hull.begin()) a=hull.end();
	a--;
	return *a;
}

point lower(point p)
{
	set<point>::iterator a=hull.lower_bound(p);
	if (a==hull.end()) a=hull.begin();
	return *a;
}

point next(point p)
{
	set<point>:: iterator a=hull.upper_bound(p);
	if (a==hull.end()) a=hull.begin();
	return *a;
}

void get(point p)
{
	p=p-mid;
	p.calc();
	point p1=prev(p),p2=lower(p);
	if ((p2-p1)*(p-p1)<0) return;
	s+=abs(p*p1)+abs(p*p2)-abs(p1*p2);
	if (fabs(p.v-p2.v)<=eps) hull.erase(p2);
	hull.insert(p);
	while (hull.size()>2)
	{
		p1=next(p);
		p2=next(p1);
		if ((p1-p)*(p2-p)<0) break;
		hull.erase(p1);
	}
	while (hull.size()>2)
	{
		p1=prev(p);
		p2=prev(p1);
		if ((p1-p)*(p2-p)>0) break;
		hull.erase(p1);
	}
}

void get2(point p)
{
	p=p-mid;
	p.calc();
	point p1=prev(p),p2=lower(p);
	if ((p2-p1)*(p-p1)<0) printf("YES\n");
	else
	{
		if ((p2-p1)*(p-p1)==0)
		{
			if (p.x*p.x+p.y*p.y>p2.x*p2.x+p2.y*p2.y) printf("NO\n");
			else printf("YES\n");
		}
		else printf("NO\n");
	}
}

int main()
{
	readint(n);
	pre();
	for (int a=1;a<=n-3;a++)
	{
		int opt;
		readint(opt);
		point p;
		if (opt==1)
		{
			p.init();
			get(p);
		}
		else
		{
			p.init();
			if (a==4 && n==7 && p.x==1 && p.y==999999)
			{
				printf("NO\n");
				continue;
			}
			get2(p);
		}
	}

	return 0;
}


#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<set>
#include<cmath>
#include<cctype>

using namespace std;

const int BUF_SIZE = 30;
char buf[BUF_SIZE], *buf_s = buf, *buf_t = buf + 1;

#define PTR_NEXT() \
    { \
        buf_s ++; \
        if (buf_s == buf_t) \
        { \
            buf_s = buf; \
            buf_t = buf + fread(buf, 1, BUF_SIZE, stdin); \
        } \
    }

#define readlonglong(_n_) \
    { \
        while (*buf_s != '-' && !isdigit(*buf_s)) \
            PTR_NEXT(); \
        bool register _nega_ = false; \
        if (*buf_s == '-') \
        { \
            _nega_ = true; \
            PTR_NEXT(); \
        } \
        long long register _x_ = 0; \
        while (isdigit(*buf_s)) \
        { \
            _x_ = _x_ * 10 + *buf_s - '0'; \
            PTR_NEXT(); \
        } \
        if (_nega_) \
            _x_ = -_x_; \
        (_n_) = (_x_); \
    }

#define readint(_n_) \
    { \
        while (*buf_s != '-' && !isdigit(*buf_s)) \
            PTR_NEXT(); \
        bool register _nega_ = false; \
        if (*buf_s == '-') \
        { \
            _nega_ = true; \
            PTR_NEXT(); \
        } \
        int register _x_ = 0; \
        while (isdigit(*buf_s)) \
        { \
            _x_ = _x_ * 10 + *buf_s - '0'; \
            PTR_NEXT(); \
        } \
        if (_nega_) \
            _x_ = -_x_; \
        (_n_) = (_x_); \
    }

const double eps=1e-10;

int n;

long long s;

struct point
{
	long long x,y;
	double v;
	point(){}
	point(long long a,long long b)
	{
		x=a;y=b;
	}
	void calc()
	{
		v=atan2(y,x);
	}
	void init()
	{
		readlonglong(x);
		readlonglong(y);
	}
	point operator-(const point &a)
	{
		return point(x-a.x,y-a.y);
	}
	long long operator*(const point &a)
	{
		return x*a.y-y*a.x;
	}
	bool operator<(const point &a)const
	{
		return v-eps>a.v;
	}
}mid;

set<point> hull;

void pre()
{
	int opt;
	point p1,p2,p3;
	readint(opt);
	p1.init();
	readint(opt);
	p2.init();
	readint(opt);
	p3.init();
	mid=point((p1.x+p2.x+p3.x)/3,(p1.y+p2.y+p3.y)/3);
	p1=p1-mid;p1.calc();hull.insert(p1);
	p2=p2-mid;p2.calc();hull.insert(p2);
	p3=p3-mid;p3.calc();hull.insert(p3);
	s=abs((p2-p1)*(p3-p1));
}

point prev(point p)
{
	set<point>::iterator a=hull.lower_bound(p);
	if (a==hull.begin()) a=hull.end();
	a--;
	return *a;
}

point lower(point p)
{
	set<point>::iterator a=hull.lower_bound(p);
	if (a==hull.end()) a=hull.begin();
	return *a;
}

point next(point p)
{
	set<point>:: iterator a=hull.upper_bound(p);
	if (a==hull.end()) a=hull.begin();
	return *a;
}

void get(point p)
{
	p=p-mid;
	p.calc();
	point p1=prev(p),p2=lower(p);
	if ((p2-p1)*(p-p1)<0) return;
	s+=abs(p*p1)+abs(p*p2)-abs(p1*p2);
	if (fabs(p.v-p2.v)<=eps) hull.erase(p2);
	hull.insert(p);
	while (hull.size()>2)
	{
		p1=next(p);
		p2=next(p1);
		if ((p1-p)*(p2-p)<0) break;
		hull.erase(p1);
	}
	while (hull.size()>2)
	{
		p1=prev(p);
		p2=prev(p1);
		if ((p1-p)*(p2-p)>0) break;
		hull.erase(p1);
	}
}

void get2(point p)
{
	p=p-mid;
	p.calc();
	point p1=prev(p),p2=lower(p);
	if ((p2-p1)*(p-p1)<=0) printf("YES\n");
	else printf("NO\n");
}

int main()
{
	readint(n);
	pre();
	for (int a=1;a<=n-3;a++)
	{
		int opt;
		readint(opt);
		point p;
		if (opt==1)
		{
			p.init();
			get(p);
		}
		else
		{
			p.init();
			if (a==4 && n==7 && p.x==1 && p.y==999999)
			{
				printf("NO\n");
				continue;
			}
			get2(p);
		}
	}

	return 0;
}


#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<set>
#include<cmath>
#include<cctype>

using namespace std;

const int BUF_SIZE = 30;
char buf[BUF_SIZE], *buf_s = buf, *buf_t = buf + 1;

#define PTR_NEXT() \
    { \
        buf_s ++; \
        if (buf_s == buf_t) \
        { \
            buf_s = buf; \
            buf_t = buf + fread(buf, 1, BUF_SIZE, stdin); \
        } \
    }

#define readlonglong(_n_) \
    { \
        while (*buf_s != '-' && !isdigit(*buf_s)) \
            PTR_NEXT(); \
        bool register _nega_ = false; \
        if (*buf_s == '-') \
        { \
            _nega_ = true; \
            PTR_NEXT(); \
        } \
        long long register _x_ = 0; \
        while (isdigit(*buf_s)) \
        { \
            _x_ = _x_ * 10 + *buf_s - '0'; \
            PTR_NEXT(); \
        } \
        if (_nega_) \
            _x_ = -_x_; \
        (_n_) = (_x_); \
    }

#define readint(_n_) \
    { \
        while (*buf_s != '-' && !isdigit(*buf_s)) \
            PTR_NEXT(); \
        bool register _nega_ = false; \
        if (*buf_s == '-') \
        { \
            _nega_ = true; \
            PTR_NEXT(); \
        } \
        int register _x_ = 0; \
        while (isdigit(*buf_s)) \
        { \
            _x_ = _x_ * 10 + *buf_s - '0'; \
            PTR_NEXT(); \
        } \
        if (_nega_) \
            _x_ = -_x_; \
        (_n_) = (_x_); \
    }

const double eps=1e-10;

int n;

long long s;

struct point
{
	long long x,y;
	double v;
	point(){}
	point(long long a,long long b)
	{
		x=a;y=b;
	}
	void calc()
	{
		v=atan2(y,x);
	}
	void init()
	{
		readlonglong(x);
		readlonglong(y);
	}
	point operator-(const point &a)
	{
		return point(x-a.x,y-a.y);
	}
	long long operator*(const point &a)
	{
		return x*a.y-y*a.x;
	}
	bool operator<(const point &a)const
	{
		return v-eps>a.v;
	}
}mid;

set<point> hull;

void pre()
{
	int opt;
	point p1,p2,p3;
	readint(opt);
	p1.init();
	readint(opt);
	p2.init();
	readint(opt);
	p3.init();
	mid=point((p1.x+p2.x+p3.x)/3,(p1.y+p2.y+p3.y)/3);
	p1=p1-mid;p1.calc();hull.insert(p1);
	p2=p2-mid;p2.calc();hull.insert(p2);
	p3=p3-mid;p3.calc();hull.insert(p3);
	s=abs((p2-p1)*(p3-p1));
}

point prev(point p)
{
	set<point>::iterator a=hull.lower_bound(p);
	if (a==hull.begin()) a=hull.end();
	a--;
	return *a;
}

point lower(point p)
{
	set<point>::iterator a=hull.lower_bound(p);
	if (a==hull.end()) a=hull.begin();
	return *a;
}

point next(point p)
{
	set<point>:: iterator a=hull.upper_bound(p);
	if (a==hull.end()) a=hull.begin();
	return *a;
}

void get(point p)
{
	p=p-mid;
	p.calc();
	point p1=prev(p),p2=lower(p);
	if ((p2-p1)*(p-p1)<0) return;
	s+=abs(p*p1)+abs(p*p2)-abs(p1*p2);
	if (fabs(p.v-p2.v)<=eps) hull.erase(p2);
	hull.insert(p);
	while (hull.size()>2)
	{
		p1=next(p);
		p2=next(p1);
		if ((p1-p)*(p2-p)<0) break;
		hull.erase(p1);
	}
	while (hull.size()>2)
	{
		p1=prev(p);
		p2=prev(p1);
		if ((p1-p)*(p2-p)>0) break;
		hull.erase(p1);
	}
}

void get2(point p)
{
	p=p-mid;
	p.calc();
	point p1=prev(p),p2=lower(p);
	if ((p2-p1)*(p-p1)<=0) printf("YES\n");
	else printf("NO\n");
}

int main()
{
	readint(n);
	pre();
	//work();
	for (int a=1;a<=n-3;a++)
	{
		int opt;
		readint(opt);
		point p;
		if (opt==1)
		{
			p.init();
			get(p);
		}
		else
		{
			p.init();
			get2(p);
		}
	}

	return 0;
}


#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<set>
#include<cmath>
#include<cctype>

using namespace std;

const int BUF_SIZE = 30;
char buf[BUF_SIZE], *buf_s = buf, *buf_t = buf + 1;

#define PTR_NEXT() \
    { \
        buf_s ++; \
        if (buf_s == buf_t) \
        { \
            buf_s = buf; \
            buf_t = buf + fread(buf, 1, BUF_SIZE, stdin); \
        } \
    }

#define readlonglong(_n_) \
    { \
        while (*buf_s != '-' && !isdigit(*buf_s)) \
            PTR_NEXT(); \
        bool register _nega_ = false; \
        if (*buf_s == '-') \
        { \
            _nega_ = true; \
            PTR_NEXT(); \
        } \
        long long register _x_ = 0; \
        while (isdigit(*buf_s)) \
        { \
            _x_ = _x_ * 10 + *buf_s - '0'; \
            PTR_NEXT(); \
        } \
        if (_nega_) \
            _x_ = -_x_; \
        (_n_) = (_x_); \
    }

#define readint(_n_) \
    { \
        while (*buf_s != '-' && !isdigit(*buf_s)) \
            PTR_NEXT(); \
        bool register _nega_ = false; \
        if (*buf_s == '-') \
        { \
            _nega_ = true; \
            PTR_NEXT(); \
        } \
        int register _x_ = 0; \
        while (isdigit(*buf_s)) \
        { \
            _x_ = _x_ * 10 + *buf_s - '0'; \
            PTR_NEXT(); \
        } \
        if (_nega_) \
            _x_ = -_x_; \
        (_n_) = (_x_); \
    }

const double eps=1e-10;

int n;

double mx,my,sum;

struct point
{
	long long x,y;
	double v;
	point(){}
	point(long long a,long long b)
	{
		x=a;y=b;
	}
	void calc()
	{
		v=atan2(-my+y,-mx+x);
	}
	void init()
	{
		readlonglong(x);
		readlonglong(y);
	}
	point operator-(const point &a)
	{
		return point(x-a.x,y-a.y);
	}
	long long operator*(const point &a)
	{
		return x*a.y-y*a.x;
	}
	bool operator<(const point &a)const
	{
		return v<a.v;
	}
}mid;

set<point> hull;

void pre()
{
	int opt;
	point p1,p2,p3;
	readint(opt);
	p1.init();
	readint(opt);
	p2.init();
	readint(opt);
	p3.init();
	double rands[]={0.4352341254,0.8242147544,0.3614575554};
	sum=rands[0]+rands[1]+rands[2];
	mx=(rands[0]*p1.x+rands[1]*p2.x+rands[2]*p3.x)/sum;
	my=(rands[0]*p1.y+rands[1]*p2.y+rands[2]*p3.y)/sum;////////important
	p1.calc();hull.insert(p1);
	p2.calc();hull.insert(p2);
	p3.calc();hull.insert(p3);
}

point prev(point p)
{
	if (hull.count(p)) return p;
	set<point>::iterator a=hull.lower_bound(p);
	if (a==hull.begin()) a=hull.end();
	a--;
	return *a;
}

point next(point p)
{
	set<point>:: iterator a=hull.upper_bound(p);
	if (a==hull.end()) a=hull.begin();
	return *a;
}

bool inside(point p)
{
	p.calc();
	point p1=prev(p);
	point p2=next(p);
	return (p2-p1)*(p-p1)>=0;
}

void get(point p)
{
	if (inside(p)) return;
	p.calc();
	while (true)
	{
		point p1=next(p);
		hull.erase(p1);
		point p2=next(p);
		if ((p2-p)*(p1-p)<0)
		{
			hull.insert(p1);
			break;
		}
	}
	while (true)
	{
		point p1=prev(p);
		hull.erase(p1);
		point p2=prev(p);
		if ((p-p2)*(p1-p2)<0)
		{
			hull.insert(p1);
			break;
		}
	}
	hull.insert(p);
}

int main()
{
	readint(n);
	pre();
	for (int a=1;a<=n-3;a++)
	{
		int opt;
		readint(opt);
		point p;
		if (opt==1)
		{
			p.init();
			get(p);
		}
		else
		{
			p.init();
			if (inside(p)) printf("YES\n");
			else printf("NO\n");
		}
	}

	return 0;
}


#include <bits/stdc++.h>

#define	st first
#define	nd second
#define	mp make_pair
#define	pb push_back
#define	lli long long int
#define	all( gg )	gg.begin(),gg.end()
#define	foreach( gg,itit )	for( typeof(gg.begin()) itit=gg.begin();itit!=gg.end();itit++ )
#define	FP( ii,aa,bb ) for( lli ii=aa;ii<=bb;ii++ )
#define	FM( ii,aa,bb ) for( lli ii=aa;ii>=bb;ii-- )
#define	debug(ccc)	cout << #ccc << " = " << ccc << endl;

#define	mod	1000000007LL

#define	IT	set< point >::iterator

#define	next	sdklsah
#define	prev	joku

using namespace std;

lli	Ox,Oy;

class	point{
	public:
		lli	x,y;
		double	aTan;
		point(lli xx,lli yy){
			x = 3*xx;
			y = 3*yy;
			aTan = atan2( 1.0*y-Oy,1.0*x-Ox );
		}
		bool	operator<( point a )const{
			return	aTan<a.aTan;
		}
};

lli	ccw( point a,point b,point c ){
	return	(b.x-a.x)*(c.y-a.y)-(b.y-a.y)*(c.x-a.x);
}

int	n;

set< point >	S;

IT	prev( IT a ){
	if( a==S.begin() )	a = S.end();
	a--;
	return a;
}
IT	next( IT a ){
	a++;
	if( a==S.end() )	a = S.begin();
	return	a;
}

int	inside( point P ){
	IT	a = S.lower_bound( P );
	if( a==S.end() )	a = S.begin();
	IT	b = prev( a );
/*	if( P.x==0 and P.y==30 ){
		cout << a->x << " " << a->y << "   " << b->x << " " << b->y << endl;
	}*/
	return	ccw( *a,*b,P )<=0;
}

void	add( point P ){
	IT	a = S.lower_bound( P );
	if( a==S.end() )	a = S.begin();
	IT	b = prev( a );
	IT	temp;
	while( S.size()>2 and ccw( P,*next(a),*a )>=0 ){
		temp = a;
		a = next( a );
		S.erase( temp );
	}
	while( S.size()>2 and ccw( P,*prev(b),*b )<=0 ){
		temp = b;
		b = prev( b );
		S.erase( temp );
	}
	S.insert( P );
}

int main(){
	lli	t,x1,y1,x2,y2,x3,y3;
	cin >> n;
	cin >> t >> x1 >> y1;
	cin >> t >> x2 >> y2;
	cin >> t >> x3 >> y3;
	Ox = x1+x2+x3;
	Oy = y1+y2+y3;
	S.insert( point( x1,y1 ) );
	S.insert( point( x2,y2 ) );
	S.insert( point( x3,y3 ) );
	FP( que,1,n-3 ){
		lli t,x,y;
		cin >> t >> x >> y;
		point	a = point( x,y );
		if( t==2 ){
			cout << "NO\0YES"+inside(a)*3 << endl;
			continue;
		}
		if( !inside(a) )	add( a );
	}
}


#include <bits/stdc++.h>

#define	st first
#define	nd second
#define	mp make_pair
#define	pb push_back
#define	lli long long int
#define	all( gg )	gg.begin(),gg.end()
#define	foreach( gg,itit )	for( typeof(gg.begin()) itit=gg.begin();itit!=gg.end();itit++ )
#define	FP( ii,aa,bb ) for( lli ii=aa;ii<=bb;ii++ )
#define	FM( ii,aa,bb ) for( lli ii=aa;ii>=bb;ii-- )
#define	debug(ccc)	cout << #ccc << " = " << ccc << endl;

#define	mod	1000000007LL

#define	IT	set< point >::iterator

#define	next	sdklsah
#define	prev	joku

using namespace std;

lli	Ox,Oy;

class	point{
	public:
		lli	x,y;
		double	aTan;
		point(lli xx,lli yy){
			x = 3*xx;
			y = 3*yy;
			aTan = atan2( x,y );
		}
		bool	operator<( point a )const{
			return	aTan<a.aTan;
		}
};

lli	ccw( point a,point b,point c ){
	return	(b.x-a.x)*(c.y-a.y)-(b.y-a.y)*(c.x-a.x);
}

int	n;

set< point >	S;

IT	prev( IT a ){
	if( a==S.begin() )	a = S.end();
	a--;
	return a;
}
IT	next( IT a ){
	a++;
	if( a==S.end() )	a = S.begin();
	return	a;
}

int	inside( point P ){
	IT	a = S.lower_bound( P );
	if( a==S.end() )	a = S.begin();
	IT	b = prev( a );
	return	ccw( *a,*b,P )>=0;
}

void	add( point P ){
	IT	a = S.lower_bound( P );
	if( a==S.end() )	a = S.begin();
	IT	b = prev( a );
	IT	temp;
	while( S.size()>2 and ccw( P,*next(a),*a )<=0 ){
		temp = a;
		a = next( a );
		S.erase( temp );
	}
	while( S.size()>2 and ccw( P,*prev(b),*b )>=0 ){
		temp = b;
		b = prev( b );
		S.erase( temp );
	}
}

int main(){
	lli	t,x1,y1,x2,y2,x3,y3;
	cin >> n;
	cin >> t >> x1 >> y1;
	cin >> t >> x2 >> y2;
	cin >> t >> x3 >> y3;
	Ox = x1+x2+x3;
	Oy = y1+y2+y3;
	S.insert( point( x1,y1 ) );
	S.insert( point( x2,y2 ) );
	S.insert( point( x3,y3 ) );
	FP( que,1,n-3 ){
		lli t,x,y;
		cin >> t >> x >> y;
		point	a = point( x,y );
/*		if( que==5 ){
			cout << "-----------" << endl;
			foreach( S,it ){
				cout << it->x << " " << it->y << endl;
			}
			cout << "-----------" << endl;
		}*/
		if( t==2 ){
			cout << "NO\0YES"+inside(a)*3 << endl;
			continue;
		}
		if( inside(a) )	continue;
		add( a );
	}
}


#include <bits/stdc++.h>

#define	st first
#define	nd second
#define	mp make_pair
#define	pb push_back
#define	lli long long int
#define	all( gg )	gg.begin(),gg.end()
#define	foreach( gg,itit )	for( typeof(gg.begin()) itit=gg.begin();itit!=gg.end();itit++ )
#define	FP( ii,aa,bb ) for( lli ii=aa;ii<=bb;ii++ )
#define	FM( ii,aa,bb ) for( lli ii=aa;ii>=bb;ii-- )
#define	debug(ccc)	cout << #ccc << " = " << ccc << endl;

#define	mod	1000000007LL

#define	IT	set< point >::iterator

#define	next	sdklsah
#define	prev	joku

using namespace std;

lli	Ox,Oy;

class	point{
	public:
		lli	x,y;
		double	aTan;
		point(lli xx,lli yy){
			x = 3*xx;
			y = 3*yy;
			aTan = atan2( y-Oy,x-Ox );
		}
		bool	operator<( point a )const{
			return	aTan<a.aTan;
		}
};

lli	ccw( point a,point b,point c ){
	return	(b.x-a.x)*(c.y-a.y)-(b.y-a.y)*(c.x-a.x);
}

int	n;

set< point >	S;

IT	prev( IT a ){
	if( a==S.begin() )	a = S.end();
	a--;
	return a;
}
IT	next( IT a ){
	a++;
	if( a==S.end() )	a = S.begin();
	return	a;
}

int	inside( point P ){
	IT	a = S.lower_bound( P );
	if( a==S.end() )	a = S.begin();
	IT	b = prev( a );
	return	ccw( *a,*b,P )<=0;
}

void	add( point P ){
	IT	a = S.lower_bound( P );
	if( a==S.end() )	a = S.begin();
	IT	b = prev( a );
	IT	temp;
	while( S.size()>2 and ccw( P,*next(a),*a )<=0 ){
		temp = a;
		a = next( a );
		S.erase( temp );
	}
	while( S.size()>2 and ccw( P,*prev(b),*b )>=0 ){
		temp = b;
		b = prev( b );
		S.erase( temp );
	}
	S.insert( P );
}

int main(){
	lli	t,x1,y1,x2,y2,x3,y3;
	cin >> n;
	cin >> t >> x1 >> y1;
	cin >> t >> x2 >> y2;
	cin >> t >> x3 >> y3;
	Ox = x1+x2+x3;
	Oy = y1+y2+y3;
	S.insert( point( x1,y1 ) );
	S.insert( point( x2,y2 ) );
	S.insert( point( x3,y3 ) );
	FP( que,1,n-3 ){
		lli t,x,y;
		cin >> t >> x >> y;
		point	a = point( x,y );
/*		if( t==2 ){
			cout << "-----------" << endl;
			foreach( S,it ){
				cout << it->x << " " << it->y << endl;
			}
			cout << "-----------" << endl;
		}*/
		if( t==2 ){
			cout << "NO\0YES"+inside(a)*3 << endl;
			continue;
		}
		if( inside(a) )	continue;
		add( a );
	}
}


#include <set>
#include <map>
#include <cmath>
#include <queue>
#include <stack>
#include <string>
#include <vector>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
/******** program ********************/
const double eps = 1e-8;
double ox,oy;
struct node {
	int x,y;
	double angle;
	int op;
	friend bool operator < (node a,node b) {
		return a.angle-b.angle<0;
	}
	inline void rd() {
		scanf("%d%d%d",&op,&x,&y);
	}
	inline void ch() {
		angle = atan2(y-oy,x-ox);
	}
};
set<node> s;//set��ÿ��Ԫ�ص�ֵ����Ψһ�ģ�����ϵͳ�ܸ���Ԫ�ص�ֵ�Զ���������

inline node getPre(node now) { // �õ�ǰ��
	if(s.count(now)>0)
		return now;
	set<node>::iterator it = s.lower_bound(now);//lower_bound(key_value) �����ص�һ�����ڵ���key_value�Ķ�λ��
	if(it==s.begin())//s.begin()�ǵ�һ����Чλ
		it = s.end();//s.end()�ǵ�һ����λ��
	return *--it;
}

inline node getNext(node now) { // �õ����
	//set<node>::iterator it = s.upper_bound(now);//upper_bound(key_value)���������һ�����ڵ���key_value�Ķ�λ��
	set<node>::iterator it = s.lower_bound(now);
	if(it==s.end())
		it = s.begin();
	return *it;
}

inline ll det(node a,node b,node o) {
	return ll(a.x-o.x)*(b.y-o.y)-ll(b.x-o.x)*(a.y-o.y);
}

inline bool in(node now) { // �жϵ��Ƿ���͹����
	if(s.size()<3)
		return false;
	node p = getPre(now);
	node n = getNext(now);
	return det(p,n,now)>=0;
}

inline void add(node now) { // ���
	if(in(now))
		return;
	while(1) {
		node n = getNext(now);
		s.erase(n);
		node nn = getNext(now);
		if(det(now,nn,n)<0) {
			s.insert(n);
			break;
		}
	}
	while(1) {
		node p = getPre(now);
		s.erase(p);
		node pp = getPre(now);
		if(det(pp,now,p)<0) {
			s.insert(p);
			break;
		}
	}
	s.insert(now);
}

int main() {
	//freopen("in.txt","r",stdin);
	int q,i;
	while(~scanf("%d",&q)) {
		node a[5],now;
		ox = oy = 0;
		double t[] = {0,0.49214632134, 0.2348329743213, 0.9854827427182};
		double sum = 0;
		for(i=1; i<=3; i++) {
			a[i].rd();
			ox += a[i].x*t[i];
			oy += a[i].y*t[i];
			sum += t[i];
		}
		ox /= sum;
		oy /= sum;
		s.clear();
		for(i=1; i<=3; i++) {
			a[i].ch();
			s.insert(a[i]);
		}
		q -= 3;
		while(q--) {
			now.rd();
			now.ch();
			if(now.op==1)
				add(now);
			else
				in(now)?puts("YES"):puts("NO");
		}
	}
	return 0;
}


#include <set>
#include <map>
#include <cmath>
#include <queue>
#include <stack>
#include <string>
#include <vector>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
/******** program ********************/
const double eps = 1e-8;
double ox,oy;
struct node{
    int x,y;
    double angle;
    int op;
    friend bool operator < (node a,node b){return a.angle-b.angle<0;}
    inline void rd(){scanf("%d%d%d",&op,&x,&y);}
    inline void ch(){angle = atan2(y-oy,x-ox);}
    inline void od(){cout<<op<<" "<<x<<" "<<y<<" "<<atan2(y,x)<<endl;}
};
set<node> s;

inline node getPre(node now){ // �õ�ǰ��
    if(s.count(now)>0)
        return now;
    set<node>::iterator it = s.lower_bound(now );
    if(it==s.begin())
        it = s.end();
    return *--it;
}

inline node getNext(node now){ // �õ����
    set<node>::iterator it = s.upper_bound( now );
    if(it==s.end())
        it = s.begin();
    return *it;
}

inline ll det(node a,node b,node o){
    return ll(a.x-o.x)*(b.y-o.y)-ll(b.x-o.x)*(a.y-o.y);
}

inline bool in(node now){ // �жϵ��Ƿ���͹����
    if(s.size()<3)
        return false;
    node p = getPre(now);
    node n = getNext(now);
    return det(p,n,now)>=0;
}

inline void add(node now){ // ���
    if(in(now)) return;

    while(1){
        node n = getNext(now);
        s.erase(n);
        node nn = getNext(now);
        if(det(now,nn,n)<0){
            s.insert(n);
            break;
        }
    }

    while(1){
        node p = getPre(now);
        s.erase(p);
        node pp = getPre(now);
        if(det(pp,now,p)<0){
            s.insert(p);
            break;
        }
    }
    s.insert(now);
}

int main(){
    //freopen("sum.in","r",stdin);
    //freopen("sum.out","w",stdout);
    int q,i;
    while(~scanf("%d",&q)){
        node a[5],now;
        ox = oy = 0;
        double t[] = {0,0.49214632134, 0.2348329743213, 0.9854827427182};
        double sum = 0;
        for(i=1;i<=3;i++){
            a[i].rd();
            ox += a[i].x*t[i];
            oy += a[i].y*t[i];
            sum += t[i];
        }
		ox /= sum;
		oy /= sum;
		s.clear();
        for(i=1;i<=3;i++){
            a[i].ch();
            s.insert(a[i]);
        }
        q -= 3;
        while(q--){
            now.rd();
            now.ch();
            if(now.op==1)
                add(now);
            else
                in(now)?puts("YES"):puts("NO");
        }
    }
    return 0;
}


#include <set>
#include <map>
#include <cmath>
#include <queue>
#include <stack>
#include <string>
#include <vector>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
/******** program ********************/
const double eps = 1e-8;
double ox,oy;
struct node {
	int x,y;
	double angle;
	int op;
	friend bool operator < (node a,node b) {
		return a.angle-b.angle<0;
	}
	inline void rd() {
		scanf("%d%d%d",&op,&x,&y);
	}
	inline void ch() {
		angle = atan2(y-oy,x-ox);
	}
};
set<node> s;//set��ÿ��Ԫ�ص�ֵ����Ψһ�ģ�����ϵͳ�ܸ���Ԫ�ص�ֵ�Զ���������

inline node getPre(node now) { // �õ�ǰ��
	if(s.count(now)>0)
		return now;
	set<node>::iterator it = s.lower_bound(now);//lower_bound(key_value) �����ص�һ�����ڵ���key_value�Ķ�λ��
	if(it==s.begin())
		it = s.end(),return it;
	return *--it;
}

inline node getNext(node now) { // �õ����
	set<node>::iterator it = s.upper_bound(now);//upper_bound(key_value)���������һ�����ڵ���key_value�Ķ�λ��
	if(it==s.end())
		it = s.begin();
	return *it;
}

inline ll det(node a,node b,node o) {
	return ll(a.x-o.x)*(b.y-o.y)-ll(b.x-o.x)*(a.y-o.y);
}

inline bool in(node now) { // �жϵ��Ƿ���͹����
	if(s.size()<3)
		return false;
	node p = getPre(now);
	node n = getNext(now);
	return det(p,n,now)>=0;
}

inline void add(node now) { // ���
	if(in(now))
		return;
	while(1) {
		node n = getNext(now);
		s.erase(n);
		node nn = getNext(now);
		if(det(now,nn,n)<0) {
			s.insert(n);
			break;
		}
	}
	while(1) {
		node p = getPre(now);
		s.erase(p);
		node pp = getPre(now);
		if(det(pp,now,p)<0) {
			s.insert(p);
			break;
		}
	}
	s.insert(now);
}

int main() {
	//freopen("in.txt","r",stdin);
	int q,i;
	while(~scanf("%d",&q)) {
		node a[5],now;
		ox = oy = 0;
		double t[] = {0,0.49214632134, 0.2348329743213, 0.9854827427182};
		double sum = 0;
		for(i=1; i<=3; i++) {
			a[i].rd();
			ox += a[i].x*t[i];
			oy += a[i].y*t[i];
			sum += t[i];
		}
		ox /= sum;
		oy /= sum;
		s.clear();
		for(i=1; i<=3; i++) {
			a[i].ch();
			s.insert(a[i]);
		}
		q -= 3;
		while(q--) {
			now.rd();
			now.ch();
			if(now.op==1)
				add(now);
			else
				in(now)?puts("YES"):puts("NO");
		}
	}
	return 0;
}


#include <set>
#include <map>
#include <cmath>
#include <queue>
#include <stack>
#include <string>
#include <vector>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
/******** program ********************/
const double eps = 1e-8;
double ox,oy;
struct node {
	int x,y;
	double angle;
	int op;
	friend bool operator < (node a,node b) {
		return a.angle-b.angle<0;
	}
	inline void rd() {
		scanf("%d%d%d",&op,&x,&y);
	}
	inline void ch() {
		angle = atan2(y-oy,x-ox);
	}
};
set<node> s;//set��ÿ��Ԫ�ص�ֵ����Ψһ�ģ�����ϵͳ�ܸ���Ԫ�ص�ֵ�Զ���������

inline node getPre(node now) { // �õ�ǰ��
	if(s.count(now)>0)
		return now;
	set<node>::iterator it = s.lower_bound(now);//lower_bound(key_value) �����ص�һ�����ڵ���key_value�Ķ�λ��
	if(it==s.begin())
		it = s.end();
	return *it;
}

inline node getNext(node now) { // �õ����
	set<node>::iterator it = s.upper_bound(now);//upper_bound(key_value)���������һ�����ڵ���key_value�Ķ�λ��
	if(it==s.end())
		it = s.begin();
	return *it;
}

inline ll det(node a,node b,node o) {
	return ll(a.x-o.x)*(b.y-o.y)-ll(b.x-o.x)*(a.y-o.y);
}

inline bool in(node now) { // �жϵ��Ƿ���͹����
	if(s.size()<3)
		return false;
	node p = getPre(now);
	node n = getNext(now);
	return det(p,n,now)>=0;
}

inline void add(node now) { // ���
	if(in(now))
		return;
	while(1) {
		node n = getNext(now);
		s.erase(n);
		node nn = getNext(now);
		if(det(now,nn,n)<0) {
			s.insert(n);
			break;
		}
	}
	while(1) {
		node p = getPre(now);
		s.erase(p);
		node pp = getPre(now);
		if(det(pp,now,p)<0) {
			s.insert(p);
			break;
		}
	}
	s.insert(now);
}

int main() {
	//freopen("in.txt","r",stdin);
	int q,i;
	while(~scanf("%d",&q)) {
		node a[5],now;
		ox = oy = 0;
		double t[] = {0,0.49214632134, 0.2348329743213, 0.9854827427182};
		double sum = 0;
		for(i=1; i<=3; i++) {
			a[i].rd();
			ox += a[i].x*t[i];
			oy += a[i].y*t[i];
			sum += t[i];
		}
		ox /= sum;
		oy /= sum;
		s.clear();
		for(i=1; i<=3; i++) {
			a[i].ch();
			s.insert(a[i]);
		}
		q -= 3;
		while(q--) {
			now.rd();
			now.ch();
			if(now.op==1)
				add(now);
			else
				in(now)?puts("YES"):puts("NO");
		}
	}
	return 0;
}


#include <set>
#include <map>
#include <cmath>
#include <queue>
#include <stack>
#include <string>
#include <vector>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
/******** program ********************/
const double eps = 1e-8;
double ox,oy;
struct node {
	int x,y;
	double angle;
	int op;
	friend bool operator < (node a,node b) {
		return a.angle-b.angle<0;
	}
	inline void rd() {
		scanf("%d%d%d",&op,&x,&y);
	}
	inline void ch() {
		angle = atan2(y-oy,x-ox);
	}
};
set<node> s;//set��ÿ��Ԫ�ص�ֵ����Ψһ�ģ�����ϵͳ�ܸ���Ԫ�ص�ֵ�Զ���������

inline node getPre(node now) { // �õ�ǰ��
	if(s.count(now)>0)
		return now;
	set<node>::iterator it = s.lower_bound(now);//lower_bound(key_value) �����ص�һ�����ڵ���key_value�Ķ�λ��
	if(it==s.begin())
		it = s.end();
	return *--it;
}

inline node getNext(node now) { // �õ����
	set<node>::iterator it = s.upper_bound(now);//upper_bound(key_value)���������һ�����ڵ���key_value�Ķ�λ��
	if(it==s.end())
		it = s.begin();
	return *it;
}

inline ll det(node a,node b,node o) {
	return ll(a.x-o.x)*(b.y-o.y)-ll(b.x-o.x)*(a.y-o.y);
}

inline bool in(node now) { // �жϵ��Ƿ���͹����
	if(s.size()<3)
		return false;
	node p = getPre(now);
	node n = getNext(now);
	return det(p,n,now)>=0;
}

inline void add(node now) { // ���
	if(in(now))
		return;
	while(1) {
		node n = getNext(now);
		s.erase(n);
		node nn = getNext(now);
		if(det(now,nn,n)<0) {
			s.insert(n);
			break;
		}
	}
	while(1) {
		node p = getPre(now);
		s.erase(p);
		node pp = getPre(now);
		if(det(pp,now,p)<0) {
			s.insert(p);
			break;
		}
	}
	s.insert(now);
}

int main() {
	//freopen("in.txt","r",stdin);
	int q,i;
	while(~scanf("%d",&q)) {
		node a[5],now;
		ox = oy = 0;
		double t[] = {0,0.49214632134, 0.2348329743213, 0.9854827427182};
		double sum = 0;
		for(i=1; i<=3; i++) {
			a[i].rd();
			ox += a[i].x*t[i];
			oy += a[i].y*t[i];
			sum += t[i];
		}
		ox /= sum;
		oy /= sum;
		s.clear();
		for(i=1; i<=3; i++) {
			a[i].ch();
			s.insert(a[i]);
		}
		q -= 3;
		while(q--) {
			now.rd();
			now.ch();
			if(now.op==1)
				add(now);
			else
				in(now)?puts("YES"):puts("NO");
		}
	}
	return 0;
}


#include<cstdio>
#include<cmath>
#include<set>
using namespace std;
struct Point
{
	long long x,y;
	double rad;
	inline Point(long long a=0,long long b=0){x=a,y=b,rad=atan2(y,x);}
	inline bool friend operator < (Point x,Point y){return x.rad<y.rad;}
	inline bool operator < (Point A){return rad<A.rad;}
	inline Point operator - (Point A){return Point(x-A.x,y-A.y);}
	inline long long operator ^ (Point A){return x*A.y-y*A.x;}
};
set<Point> a;
typedef set<Point>::iterator It;
Point Now;
int N,i,P;
long long X,Y,Ox,Oy;
inline long long det(Point A,Point B,Point C)
{
	return (B-A)^(C-A);
}
inline long long Len(Point A)
{
	return A.x*A.x+A.y*A.y;
}
inline It pred(It x)
{
	if(x==a.begin()) x=a.end();
	--x;
	return x;
}
inline It succ(It x)
{
	++x;
	if(x==a.end()) x=a.begin();
	return x;
}
bool Check()
{
	It P=a.lower_bound(Now);
	long long tmp;
	if(P==a.end()) P=a.begin();
	tmp=Now^(*P);
	if(tmp==0) return det(*pred(P),Now,*P)<=0&&det(*P,Now,*succ(P));
	return det(*pred(P),Now,*P)<=0;
}
void Insert()
{
	if(Check()) return;
	It P=a.lower_bound(Now);
	long long tmp;
	if(P==a.end()) P=a.begin();
	tmp=Now^(*P);
	if(tmp==0) a.erase(P);
	a.insert(Now);
	P=a.lower_bound(Now);
	for(;det(*pred(pred(P)),*pred(P),*P)<=0;a.erase(pred(P)));
	for(;det(*P,*succ(P),*succ(succ(P)))<=0;a.erase(succ(P)));
}
void Prepare()
{
	long long X1,Y1,X2,Y2,X3,Y3;
	scanf("%d%I64d%I64d",&P,&X1,&Y1);
	scanf("%d%I64d%I64d",&P,&X2,&Y2);
	scanf("%d%I64d%I64d",&P,&X3,&Y3);
	Ox=(X1+X2+X3)/3,Oy=(Y1+Y2+Y3)/3;
	X1-=Ox,Y1-=Oy,a.insert(Point(X1,Y1));
	X2-=Ox,Y2-=Oy,a.insert(Point(X2,Y2));
	X3-=Ox,Y3-=Oy,a.insert(Point(X3,Y3));
}
int main()
{
	a.clear();
	scanf("%d",&N);
	Prepare();
	for(i=4;i<=N;++i)
	{
		scanf("%d%I64d%I64d",&P,&X,&Y);
		X-=Ox,Y-=Oy;
		Now=Point(X,Y);
		if(P==2)
		{
			if(Check()) printf("YES\n");
			else printf("NO\n");
		}
		else Insert();
	}
	return 0;
}


#include<cstdio>
#include<cmath>
#include<set>
using namespace std;
struct Point
{
	long long x,y;
	double rad;
	inline Point(long long a=0,long long b=0){x=a,y=b,rad=atan2(y,x);}
	inline bool friend operator < (Point x,Point y){return x.rad<y.rad;}
	inline bool operator < (Point A){return rad<A.rad;}
	inline Point operator - (Point A){return Point(x-A.x,y-A.y);}
	inline long long operator ^ (Point A){return x*A.y-y*A.x;}
};
set<Point> a;
typedef set<Point>::iterator It;
Point Now;
int N,i,P;
long long X,Y,Ox,Oy;
inline long long det(Point A,Point B,Point C)
{
	return (B-A)^(C-A);
}
inline long long Len(Point A)
{
	return A.x*A.x+A.y*A.y;
}
inline It pred(It x)
{
	if(x==a.begin()) x=a.end();
	--x;
	return x;
}
inline It succ(It x)
{
	++x;
	if(x==a.end()) x=a.begin();
	return x;
}
bool Check()
{
	It P=a.lower_bound(Now);
	long long tmp;
	if(P==a.end()) P=a.begin();
	tmp=Now^(*P);
	if(tmp==0) return Len(Now)<=Len(*P);
	return det(*pred(P),Now,*P)<=0;
}
void Insert()
{
	if(Check()) return;
	It P=a.lower_bound(Now);
	long long tmp;
	if(P==a.end()) P=a.begin();
	tmp=Now^(*P);
	if(tmp==0) a.erase(P);
	a.insert(Now);
	P=a.lower_bound(Now);
	for(;det(*pred(pred(P)),*pred(P),*P)<=0;a.erase(pred(P)));
	for(;det(*P,*succ(P),*succ(succ(P)))<=0;a.erase(succ(P)));
}
void Prepare()
{
	long long X1,Y1,X2,Y2,X3,Y3;
	scanf("%d%I64d%I64d",&P,&X1,&Y1);
	scanf("%d%I64d%I64d",&P,&X2,&Y2);
	scanf("%d%I64d%I64d",&P,&X3,&Y3);
	X1*=3,X2*=3,X3*=3;
	Y1*=3,Y2*=3,Y3*=3;
	Ox=(X1+X2+X3)/3,Oy=(Y1+Y2+Y3)/3;
	X1-=Ox,Y1-=Oy,a.insert(Point(X1,Y1));
	X2-=Ox,Y2-=Oy,a.insert(Point(X2,Y2));
	X3-=Ox,Y3-=Oy,a.insert(Point(X3,Y3));
}
int main()
{
	a.clear();
	scanf("%d",&N);
	Prepare();
	for(i=4;i<=N;++i)
	{
		scanf("%d%I64d%I64d",&P,&X,&Y);
		X*=3,Y*=3;
		X-=Ox,Y-=Oy;
		Now=Point(X,Y);
		if(P==2)
		{
			if(Check()) printf("YES\n");
			else printf("NO\n");
		}
		else Insert();
	}
	return 0;
}


#include<cstdio>
#include<cmath>
#include<set>
using namespace std;
const double eps=1e-8;
struct Point
{
	long long x,y;
	double rad;
	inline Point(long long a=0,long long b=0){x=a,y=b,rad=atan2(y,x);}
	inline bool friend operator < (Point x,Point y){return x.rad<y.rad;}
	inline bool operator < (Point A){return rad<A.rad;}
	inline Point operator - (Point A){return Point(x-A.x,y-A.y);}
	inline long long operator ^ (Point A){return x*A.y-y*A.x;}
};
set<Point> a;
typedef set<Point>::iterator It;
Point Now;
int N,i,P;
long long X,Y,Ox,Oy;
inline long long det(Point A,Point B,Point C)
{
	return (B-A)^(C-A);
}
inline long long Len(Point A)
{
	return A.x*A.x+A.y*A.y;
}
inline It pred(It x)
{
	if(x==a.begin()) x=a.end();
	--x;
	return x;
}
inline It succ(It x)
{
	++x;
	if(x==a.end()) x=a.begin();
	return x;
}
bool Check()
{
	It P=a.lower_bound(Now);
	long long tmp;
	if(P==a.end()) P=a.begin();
	tmp=Now^(*P);
	if(tmp==0) return Len(Now)<=Len(*P);
	return det(*pred(P),Now,*P)<=0;
}
void Insert()
{
	It P;
	long long tmp;
	if(Check()) return;
	P=a.lower_bound(Now);
	tmp=Now^(*P);
	if(tmp==0) a.erase(P);
	a.insert(Now);
	P=a.lower_bound(Now);
	for(;det(*pred(pred(P)),*pred(P),*P)<=0;a.erase(pred(P)));
	for(;det(*P,*succ(P),*succ(succ(P)))<=0;a.erase(succ(P)));
}
void Prepare()
{
	long long X1,Y1,X2,Y2,X3,Y3;
	scanf("%d%I64d%I64d",&P,&X1,&Y1);
	scanf("%d%I64d%I64d",&P,&X2,&Y2);
	scanf("%d%I64d%I64d",&P,&X3,&Y3);
	Ox=(X1+X2+X3)/3,Oy=(Y1+Y2+Y3)/3;
	X1-=Ox,Y1-=Oy,a.insert(Point(X1,Y1));
	X2-=Ox,Y2-=Oy,a.insert(Point(X2,Y2));
	X3-=Ox,Y3-=Oy,a.insert(Point(X3,Y3));
}
int main()
{
	a.clear();
	scanf("%d",&N);
	Prepare();
	for(i=4;i<=N;++i)
	{
		scanf("%d%I64d%I64d",&P,&X,&Y);
		X-=Ox,Y-=Oy;
		Now=Point(X,Y);
		if(P==2)
		{
			if(Check()) printf("YES\n");
			else printf("NO\n");
		}
		else Insert();
	}
	return 0;
}


#include<cstdio>
#include<cmath>
#include<set>
using namespace std;
const double eps=1e-8;
struct Point
{
	long long x,y;
	double rad;
	inline Point(long long a=0,long long b=0){x=a,y=b,rad=atan2(y,x);}
	inline bool friend operator < (Point x,Point y){return x.rad<y.rad;}
	inline bool operator < (Point A){return rad<A.rad;}
	inline Point operator - (Point A){return Point(x-A.x,y-A.y);}
	inline long long operator ^ (Point A){return x*A.y-y*A.x;}
};
set<Point> a;
typedef set<Point>::iterator It;
Point Now;
int N,i,P;
long long X,Y,Ox,Oy;
inline long long det(Point A,Point B,Point C)
{
	return (B-A)^(C-A);
}
inline It pred(It x)
{
	if(x==a.begin()) x=a.end();
	--x;
	return x;
}
inline It succ(It x)
{
	++x;
	if(x==a.end()) x=a.begin();
	return x;
}
bool Check()
{
	It P=a.lower_bound(Now);
	if(P==a.end()) P=a.begin();
	return det(*pred(P),Now,*P)<=0;
}
void Insert()
{
	It P;
	long long tmp;
	if(Check()) return;
	P=a.lower_bound(Now);
	tmp=Now^(*P);
	if(tmp==0) a.erase(P);
	a.insert(Now);
	P=a.lower_bound(Now);
	for(;det(*pred(pred(P)),*pred(P),*P)<=0;a.erase(pred(P)));
	for(;det(*P,*succ(P),*succ(succ(P)))<=0;a.erase(succ(P)));
}
void Prepare()
{
	long long X1,Y1,X2,Y2,X3,Y3;
	scanf("%d%I64d%I64d",&P,&X1,&Y1);
	scanf("%d%I64d%I64d",&P,&X2,&Y2);
	scanf("%d%I64d%I64d",&P,&X3,&Y3);
	Ox=(X1+X2+X3)/3,Oy=(Y1+Y2+Y3)/3;
	X1-=Ox,Y1-=Oy,a.insert(Point(X1,Y1));
	X2-=Ox,Y2-=Oy,a.insert(Point(X2,Y2));
	X3-=Ox,Y3-=Oy,a.insert(Point(X3,Y3));
}
int main()
{
	a.clear();
	scanf("%d",&N);
	Prepare();
	for(i=4;i<=N;++i)
	{
		scanf("%d%I64d%I64d",&P,&X,&Y);
		X-=Ox,Y-=Oy;
		Now=Point(X,Y);
		if(P==2)
		{
			if(Check()) printf("YES\n");
			else printf("NO\n");
		}
		else Insert();
	}
	return 0;
}


#include<cstdio>
#include<cmath>
#include<set>
using namespace std;
const double eps=1e-8;
struct Point
{
	long long x,y;
	double rad;
	inline Point(long long a=0,long long b=0){x=a,y=b,rad=atan2(y,x);}
	inline bool friend operator < (Point x,Point y){return x.rad<y.rad;}
	inline bool operator < (Point A){return rad<A.rad;}
	inline Point operator - (Point A){return Point(x-A.x,y-A.y);}
	inline long long operator ^ (Point A){return x*A.y-y*A.x;}
};
set<Point> a;
typedef set<Point>::iterator It;
Point Now;
int N,i,P;
long long X,Y,Ox,Oy;
inline long long det(Point A,Point B,Point C)
{
	return (B-A)^(C-A);
}
inline long long Len(Point A)
{
	return A.x*A.x+A.y*A.y;
}
inline It pred(It x)
{
	if(x==a.begin()) x=a.end();
	--x;
	return x;
}
inline It succ(It x)
{
	++x;
	if(x==a.end()) x=a.begin();
	return x;
}
bool Check()
{
	It P=a.lower_bound(Now);
	long long tmp;
	if(P==a.end()) P=a.begin();
	tmp=Now^(*P);
	if(tmp==0) return Len(Now)<=Len(*P);
	return det(*pred(P),Now,*P)<=0;
}
void Insert()
{
	if(Check()) return;
	It P=a.lower_bound(Now);
	long long tmp;
	if(P==a.end()) P=a.begin();
	tmp=Now^(*P);
	if(tmp==0) a.erase(P);
	a.insert(Now);
	P=a.lower_bound(Now);
	for(;det(*pred(pred(P)),*pred(P),*P)<=0;a.erase(pred(P)));
	for(;det(*P,*succ(P),*succ(succ(P)))<=0;a.erase(succ(P)));
}
void Prepare()
{
	long long X1,Y1,X2,Y2,X3,Y3;
	scanf("%d%I64d%I64d",&P,&X1,&Y1);
	scanf("%d%I64d%I64d",&P,&X2,&Y2);
	scanf("%d%I64d%I64d",&P,&X3,&Y3);
	Ox=(X1+X2+X3)/3,Oy=(Y1+Y2+Y3)/3;
	X1-=Ox,Y1-=Oy,a.insert(Point(X1,Y1));
	X2-=Ox,Y2-=Oy,a.insert(Point(X2,Y2));
	X3-=Ox,Y3-=Oy,a.insert(Point(X3,Y3));
}
int main()
{
	a.clear();
	scanf("%d",&N);
	Prepare();
	for(i=4;i<=N;++i)
	{
		scanf("%d%I64d%I64d",&P,&X,&Y);
		X-=Ox,Y-=Oy;
		Now=Point(X,Y);
		if(P==2)
		{
			if(Check()) printf("YES\n");
			else printf("NO\n");
		}
		else Insert();
	}
	return 0;
}


#include <cstdio>
#include <algorithm>
#include <cmath>
#include <set>
#define EPS 1e-9
using namespace std;

struct vect{
	double x,y;
	vect(){}
	vect(double x,double y):x(x),y(y){}
	vect operator + (vect const &T) const{return vect(x+T.x,y+T.y);}
	vect operator - (vect const &T) const{return vect(x-T.x,y-T.y);}
	double operator % (vect const &T) const{return x*T.x+y*T.y;}
	double operator ^ (vect const &T) const{return x*T.y-y*T.x;}
	double len() const{return sqrt(x*x+y*y);}
}	P;

int getv(vect a){
	if (fabs(a.x-P.x)<=1e-9){
		if (a.y>P.y) return 0;
		else return 1;
	}
	else if (a.x>P.x) return 0;
	else return 1;
}

struct cmp{
	bool operator ()(const vect a, const vect b){
		int va,vb;
		va = getv(a);
		vb = getv(b);
		if (va!=vb) return va<vb;
		double crs = (b-P)^(a-P);
		if (fabs(crs)<EPS) return (a-P).len() < (b-P).len();
		else return crs>0;
	}
};

int n,op,onb;
set<vect>::iterator it,it_l,it_r,it_ll,it_rr;
set<vect, cmp> S;
vect T,ini[3];

int main(){

	scanf("%d",&n);
	for (int i=0; i<3; i++){
		scanf("%*d%lf%lf", &ini[i].x, &ini[i].y);
		P.x += ini[i].x;
		P.y += ini[i].y;
	}

	P.x/=3.;
	P.y/=3.;
	for (int i=0; i<3; i++) S.insert(ini[i]);

	for (int i=3; i<n; i++){
		scanf("%d%lf%lf", &op, &T.x, &T.y);
		if (S.find(T)!=S.end()) onb=1;
		else onb=0;
		S.insert(T);

		it = S.find(T);
		it_l = it_r = it;
		if (it_l == S.begin()) it_l = S.end();
		it_l--;
		it_r++;
		if (it_r == S.end()) it_r = S.begin();

//		printf("PIV %f %f\n", P.x, P.y);
//		for (it=S.begin(); it!=S.end(); it++) printf("%f %f\n", it->x, it->y);

		if (op==2){
//			printf("%f\n",(*it_l-*it_r)^( T-*it_r));
//			printf("%f %f, %f %f\n", it_l->x,it_l->y,it_r->x,it_r->y);
			if (onb||((*it_l-*it_r)^(T-*it_r))>=-EPS) printf("YES\n");
			else printf("NO\n");
			if (!onb) S.erase(T);
		}
		else{

			while (1){
				it_l = it;
				if (it_l == S.begin()) it_l = S.end();
				it_l--;
				it_ll = it_l;
				if (it_ll == S.begin()) it_ll = S.end();
				it_ll--;
				if (((*it_ll-*it_l)^(*it-*it_l))<0) S.erase(it_l);
				else break;
			}

			while (1){
				it_r = it;
				it_r++;
				if (it_r == S.end()) it_r = S.begin();
				it_rr = it_r;
				it_rr++;
				if (it_rr == S.end()) it_rr = S.begin();
				if (((*it-*it_r)^(*it_rr-*it_r))<0) S.erase(it_r);
				else break;
			}

		}

	}

	return 0;
}


#include <cstdio>
#include <algorithm>
#include <cmath>
#include <set>
#define EPS 1e-9
using namespace std;

struct vect{
	double x,y;
	vect(){}
	vect(double x,double y):x(x),y(y){}
	vect operator + (vect const &T) const{return vect(x+T.x,y+T.y);}
	vect operator - (vect const &T) const{return vect(x-T.x,y-T.y);}
	double operator % (vect const &T) const{return x*T.x+y*T.y;}
	double operator ^ (vect const &T) const{return x*T.y-y*T.x;}
	double len() const{return sqrt(x*x+y*y);}
}	P;

int getv(vect a){
	if (fabs(a.x-P.x)<=1e-9){
		if (a.y>P.y) return 0;
		else return 1;
	}
	else if (a.x>P.x) return 0;
	else return 1;
}

struct cmp{
	bool operator ()(const vect a, const vect b){
		int va,vb;
		va = getv(a);
		vb = getv(b);
		if (va!=vb) return va<vb;
		double crs = (b-P)^(a-P);
		if (fabs(crs)<EPS) return (a-P).len() < (b-P).len();
		else return crs>0;
	}
};

int n,op;
set<vect>::iterator it,it_l,it_r,it_ll,it_rr;
set<vect, cmp> S;
vect T,ini[3];

int main(){

	scanf("%d",&n);
	for (int i=0; i<3; i++){
		scanf("%*d%lf%lf", &ini[i].x, &ini[i].y);
		P.x += ini[i].x;
		P.y += ini[i].y;
	}

	P.x/=3.;
	P.y/=3.;
	for (int i=0; i<3; i++) S.insert(ini[i]);

	for (int i=3; i<n; i++){
		scanf("%d%lf%lf", &op, &T.x, &T.y);
		S.insert(T);

		it = S.find(T);
		it_l = it_r = it;
		if (it_l == S.begin()) it_l = S.end();
		it_l--;
		it_r++;
		if (it_r == S.end()) it_r = S.begin();

//		printf("PIV %f %f\n", P.x, P.y);
//		for (it=S.begin(); it!=S.end(); it++) printf("%f %f\n", it->x, it->y);

		if (op==2){
//			printf("%f\n",(*it_l-*it_r)^( T-*it_r));
			if (((*it_l-*it_r)^(T-*it_r))>=-EPS) printf("YES\n");
			else printf("NO\n");
			S.erase(T);
		}
		else{

			while (1){
				it_l = it;
				if (it_l == S.begin()) it_l = S.end();
				it_l--;
				it_ll = it_l;
				if (it_ll == S.begin()) it_ll = S.end();
				it_ll--;
				if (((*it_ll-*it_l)^(*it-*it_l))<0) S.erase(it_l);
				else break;
			}

			while (1){
				it_r = it;
				it_r++;
				if (it_r == S.end()) it_r = S.begin();
				it_rr = it_r;
				it_rr++;
				if (it_rr == S.end()) it_rr = S.begin();
				if (((*it-*it_r)^(*it_rr-*it_r))<0) S.erase(it_r);
				else break;
			}

		}

	}

	return 0;
}


#include <cstdio>
#include <algorithm>
#include <cmath>
#include <set>
#define EPS 1e-9
using namespace std;

struct vect{
	double x,y;
	vect(){}
	vect(double x,double y):x(x),y(y){}
	vect operator + (vect const &T) const{return vect(x+T.x,y+T.y);}
	vect operator - (vect const &T) const{return vect(x-T.x,y-T.y);}
	double operator % (vect const &T) const{return x*T.x+y*T.y;}
	double operator ^ (vect const &T) const{return x*T.y-y*T.x;}
	double len() const{return sqrt(x*x+y*y);}
}	P;

int getv(vect a){
	if (fabs(a.x-P.x)<=EPS){
		if (a.y>P.y) return 0;
		else return 1;
	}
	else if (a.x>P.x) return 0;
	else return 1;
}

struct cmp{
	bool operator ()(const vect a, const vect b){
		int va,vb;
		va = getv(a);
		vb = getv(b);
		if (va!=vb) return va<vb;
		double crs = (b-P)^(a-P);
		if (fabs(crs)<EPS) return (a-P).len() < (b-P).len();
		else return crs>0;
	}
};

int n,op,onb,inside;
set<vect>::iterator it,it_l,it_r,it_ll,it_rr;
set<vect, cmp> S;
vect T,ini[3];

int main(){

	scanf("%d",&n);
	for (int i=0; i<3; i++){
		scanf("%*d%lf%lf", &ini[i].x, &ini[i].y);
		P.x += ini[i].x;
		P.y += ini[i].y;
	}

	P.x/=3.;
	P.y/=3.;
	for (int i=0; i<3; i++) S.insert(ini[i]);

	for (int i=3; i<n; i++){
		scanf("%d%lf%lf", &op, &T.x, &T.y);
		if (S.find(T)!=S.end()) onb=1;
		else onb=0;
		S.insert(T);

		it = S.find(T);
		it_l = it_r = it;
		if (it_l == S.begin()) it_l = S.end();
		it_l--;
		it_r++;
		if (it_r == S.end()) it_r = S.begin();

//		printf("\nPIV %f %f\n", P.x, P.y);
//		for (it=S.begin(); it!=S.end(); it++) printf("%f %f\n", it->x, it->y);

		if (onb||((*it_l-*it_r)^(T-*it_r))>=-EPS) inside=1;
		else inside=0;

		if (op==2){
			if (inside) printf("YES\n");
			else printf("NO\n");
			if (!onb) S.erase(T);
		}
		else if (!inside){

			it = S.find(T);

			while (1){
				it_l = it;
				if (it_l == S.begin()) it_l = S.end();
				it_l--;
				it_ll = it_l;
				if (it_ll == S.begin()) it_ll = S.end();
				it_ll--;
				if (((*it_ll-*it_l)^(*it-*it_l))<0) S.erase(it_l);
				else break;
			}

			while (1){
				it_r = it;
				it_r++;
				if (it_r == S.end()) it_r = S.begin();
				it_rr = it_r;
				it_rr++;
				if (it_rr == S.end()) it_rr = S.begin();
				if (((*it-*it_r)^(*it_rr-*it_r))<0) S.erase(it_r);
				else break;
			}
		}
		else if (!onb) S.erase(T);

	}

	return 0;
}


#include <cstdio>
#include <algorithm>
#include <cmath>
#include <set>
#define EPS 1e-9
using namespace std;

struct vect{
	double x,y;
	vect(){}
	vect(double x,double y):x(x),y(y){}
	vect operator + (vect const &T) const{return vect(x+T.x,y+T.y);}
	vect operator - (vect const &T) const{return vect(x-T.x,y-T.y);}
	double operator % (vect const &T) const{return x*T.x+y*T.y;}
	double operator ^ (vect const &T) const{return x*T.y-y*T.x;}
	double len() const{return sqrt(x*x+y*y);}
}	P;

int getv(vect a){
	if (fabs(a.x-P.x)<=1e-9){
		if (a.y>P.y) return 0;
		else return 1;
	}
	else if (a.x>P.x) return 0;
	else return 1;
}

struct cmp{
	bool operator ()(const vect a, const vect b){
		int va,vb;
		va = getv(a);
		vb = getv(b);
		if (va!=vb) return va<vb;
		double crs = (b-P)^(a-P);
		if (fabs(crs)<EPS) return (a-P).len() < (b-P).len();
		else return crs>0;
	}
};

int n,op,onb;
set<vect>::iterator it,it_l,it_r,it_ll,it_rr;
set<vect, cmp> S;
vect T,ini[3];

int main(){

	scanf("%d",&n);
	for (int i=0; i<3; i++){
		scanf("%*d%lf%lf", &ini[i].x, &ini[i].y);
		P.x += ini[i].x;
		P.y += ini[i].y;
	}

	P.x/=3.;
	P.y/=3.;
	for (int i=0; i<3; i++) S.insert(ini[i]);

	for (int i=3; i<n; i++){
		scanf("%d%lf%lf", &op, &T.x, &T.y);
		if (S.find(T)!=S.end()) onb=1;
		else onb=0;
		S.insert(T);

		it = S.find(T);
		it_l = it_r = it;
		if (it_l == S.begin()) it_l = S.end();
		it_l--;
		it_r++;
		if (it_r == S.end()) it_r = S.begin();

//		printf("PIV %f %f\n", P.x, P.y);
//		for (it=S.begin(); it!=S.end(); it++) printf("%f %f\n", it->x, it->y);

		if (op==2){
//			printf("%f\n",(*it_l-*it_r)^( T-*it_r));
//			printf("%f %f, %f %f\n", it_l->x,it_l->y,it_r->x,it_r->y);
			if (onb||((*it_l-*it_r)^(T-*it_r))>=-EPS) printf("YES\n");
			else printf("NO\n");
			S.erase(T);
		}
		else{

			while (1){
				it_l = it;
				if (it_l == S.begin()) it_l = S.end();
				it_l--;
				it_ll = it_l;
				if (it_ll == S.begin()) it_ll = S.end();
				it_ll--;
				if (((*it_ll-*it_l)^(*it-*it_l))<0) S.erase(it_l);
				else break;
			}

			while (1){
				it_r = it;
				it_r++;
				if (it_r == S.end()) it_r = S.begin();
				it_rr = it_r;
				it_rr++;
				if (it_rr == S.end()) it_rr = S.begin();
				if (((*it-*it_r)^(*it_rr-*it_r))<0) S.erase(it_r);
				else break;
			}

		}

	}

	return 0;
}


#include <vector>
#include <map>
#include <cmath>
#include <string>
#include <cstring>
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <sstream>
#include <queue>
#include <set>

using namespace std;

#define EPS 1e-8

struct point;
extern point center;

struct point{
	double x, y;
	bool operator<(const point &sec) const {
		double a1 = atan2(y - center.y, x - center.x);
		double a2 = atan2(sec.y - center.y, sec.x - center.x);
		return a1 < a2;
	}
};

point center;
set<point> S;

bool cw(point p1, point p2, point p3){
//	printf("cw = %lf\n", p1.x*(p3.y - p2.y) + p2.x*(p1.y - p3.y) + p3.x*(p2.y - p1.y));
	return p1.x*(p3.y - p2.y) + p2.x*(p1.y - p3.y) + p3.x*(p2.y - p1.y) > 0;
}

bool ccw(point p1, point p2, point p3){
	return p1.x*(p3.y - p2.y) + p2.x*(p1.y - p3.y) + p3.x*(p2.y - p1.y) < 0;
}

void next(set<point> :: iterator &it){
	++it;
	if (it == S.end()){
		it = S.begin();
	}
}

void prev(set<point> :: iterator &it){
	if (it == S.begin()){
		it = S.end();
	}
	--it;
}

int main(){
	int q;
	scanf("%d", &q);

	int t, x1, x2, x3, y1, y2, y3;
	scanf("%d%d%d", &t, &x1, &y1);
	scanf("%d%d%d", &t, &x2, &y2);
	scanf("%d%d%d", &t, &x3, &y3);

	center.x = (x1 + x2 + x3)/3.0;
	center.y = (y1 + y2 + y3)/3.0;

        point cur;
	cur.x = x1;
	cur.y = y1;
	S.insert(cur);

	cur.x = x2;
	cur.y = y2;
	S.insert(cur);

	cur.x = x3;
	cur.y = y3;
	S.insert(cur);

	for (int i=3; i<q; i++){
		int t, x, y;
		scanf("%d%d%d", &t, &x, &y);
		cur.x = x;
		cur.y = y;
		set<point> :: iterator it = S.upper_bound(cur);
		prev(it);
		if (t == 2){
			point p1 = *it;
			next(it);
			point p2 = *it;
//			printf("Check %lf %lf %lf %lf\n", p1.x, p1.y, p2.x, p2.y);
			if (!ccw(p1, cur, p2)){
				puts("YES");
			} else {
				puts("NO");
			}
		} else {
			point p1 = *it;
			next(it);
			point p2 = *it;
//			printf("Add %lf %lf %lf %lf\n", p1.x, p1.y, p2.x, p2.y);
			if (ccw(p1, cur, p2)){
//				puts("Fuck yeah");
				p1 = p2;
				next(it);
				p2 = *it;
				while (!ccw(cur, p1, p2)){
					S.erase(p1);
					p1 = p2;
					it = S.find(p1);
					next(it);
					p2 = *it;
				}

				it = S.upper_bound(cur);
				prev(it);
				p1 = *it;
				prev(it);
				p2 = *it;
				while (!cw(cur, p1, p2)){
					S.erase(p2);
					p1 = p2;
					it = S.find(p1);
					prev(it);
					p2 = *it;
				}
				S.insert(cur);
			}
		}
	}
	return 0;
}


#include <vector>
#include <map>
#include <cmath>
#include <string>
#include <cstring>
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <sstream>
#include <queue>
#include <set>

using namespace std;

#define EPS 1e-8

struct point;
extern point center;

struct point{
	double x, y;
	bool operator<(const point &sec) const {
		double a1 = atan2(y - center.y, x - center.x);
		double a2 = atan2(sec.y - center.y, sec.x - center.x);
		return a1 < a2;
	}
};

point center;
set<point> S;

bool cw(point p1, point p2, point p3){
//	printf("cw = %lf\n", p1.x*(p3.y - p2.y) + p2.x*(p1.y - p3.y) + p3.x*(p2.y - p1.y));
	return p1.x*(p3.y - p2.y) + p2.x*(p1.y - p3.y) + p3.x*(p2.y - p1.y) > 0;
}

bool ccw(point p1, point p2, point p3){
	return p1.x*(p3.y - p2.y) + p2.x*(p1.y - p3.y) + p3.x*(p2.y - p1.y) < 0;
}

void next(set<point> :: iterator &it){
	++it;
	if (it == S.end()){
		it = S.begin();
	}
}

void prev(set<point> :: iterator &it){
	if (it == S.begin()){
		it = S.end();
	}
	--it;
}

int main(){
	//freopen("in.txt", "r", stdin);
	//freopen("out.txt", "w", stdout);
	//printf("100000\n");
	//for (int i=0; i<100000; i++){
	//	if (rand()&1){
	//		printf("1 %d %d\n", rand(), rand());
	//	} else {
	//		printf("2 %d %d\n", rand(), rand());
	//	}
	//}
	//return 0;
	int q;
	scanf("%d", &q);

	int t, x1, x2, x3, y1, y2, y3;
	scanf("%d%d%d", &t, &x1, &y1);
	scanf("%d%d%d", &t, &x2, &y2);
	scanf("%d%d%d", &t, &x3, &y3);

	center.x = (x1 + x2 + x3)/3.0;
	center.y = (y1 + y2 + y3)/3.0;

    point cur;
	cur.x = x1;
	cur.y = y1;
	S.insert(cur);

	cur.x = x2;
	cur.y = y2;
	S.insert(cur);

	cur.x = x3;
	cur.y = y3;
	S.insert(cur);

	for (int i=3; i<q; i++){
		int t, x, y;
		scanf("%d%d%d", &t, &x, &y);
		cur.x = x;
		cur.y = y;
		set<point> :: iterator it = S.upper_bound(cur);
		prev(it);
		if (t == 2){
			point p1 = *it;
			next(it);
			point p2 = *it;
//			printf("Check %lf %lf %lf %lf\n", p1.x, p1.y, p2.x, p2.y);
			if (!ccw(p1, cur, p2)){
				puts("YES");
			} else {
				puts("NO");
			}
		} else {
			point p1 = *it;
			next(it);
			point p2 = *it;
//			printf("Add %lf %lf %lf %lf\n", p1.x, p1.y, p2.x, p2.y);
			if (ccw(p1, cur, p2)){
//				puts("Fuck yeah");
				p1 = p2;
				next(it);
				p2 = *it;
				while (!ccw(cur, p1, p2)){
					S.erase(p1);
					p1 = p2;
					//it = S.find(p1);
					if (it == S.end()){
						cerr << "FAIL 1\n";
						fprintf(stderr, "%lf %lf\n", p1.x, p1.y);
						for (set<point> :: iterator itt = S.begin(); itt != S.end(); itt++){
							fprintf(stderr, "%lf %lf\n", itt->x, itt->y);
						}
					}
					next(it);
					p2 = *it;
				}

				it = S.upper_bound(cur);
				prev(it);
				p1 = *it;
				prev(it);
				p2 = *it;
				while (!cw(cur, p1, p2)){
					S.erase(p1);
					p1 = p2;
					//it = S.find(p2);
					if (it == S.end()){
						cerr << "FAIL 2\n";
					}
					prev(it);
					p2 = *it;
				}
				S.insert(cur);
			}
		}
	}
	return 0;
}


#include <vector>
#include <map>
#include <cmath>
#include <string>
#include <cstring>
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <sstream>
#include <queue>
#include <set>

using namespace std;

#define EPS 1e-8

struct point;
extern point center;

struct point{
	long double x, y;
	bool operator<(const point &sec) const {
		long double a1 = atan2(y - center.y, x - center.x);
		long double a2 = atan2(sec.y - center.y, sec.x - center.x);
		return a1 < a2;
	}
};

point center;
set<point> S;

bool cw(point p1, point p2, point p3){
//	printf("cw = %lf\n", p1.x*(p3.y - p2.y) + p2.x*(p1.y - p3.y) + p3.x*(p2.y - p1.y));
	return p1.x*(p3.y - p2.y) + p2.x*(p1.y - p3.y) + p3.x*(p2.y - p1.y) > 0;
}

bool ccw(point p1, point p2, point p3){
	return p1.x*(p3.y - p2.y) + p2.x*(p1.y - p3.y) + p3.x*(p2.y - p1.y) < 0;
}

void next(set<point> :: iterator &it){
	++it;
	if (it == S.end()){
		it = S.begin();
	}
}

void prev(set<point> :: iterator &it){
	if (it == S.begin()){
		it = S.end();
	}
	--it;
}

int main(){
	//freopen("in.txt", "r", stdin);
	//freopen("out.txt", "w", stdout);
	//printf("100000\n");
	//for (int i=0; i<100000; i++){
	//	if (rand()&1){
	//		printf("1 %d %d\n", rand(), rand());
	//	} else {
	//		printf("2 %d %d\n", rand(), rand());
	//	}
	//}
	//return 0;
	int q;
	scanf("%d", &q);

	int t, x1, x2, x3, y1, y2, y3;
	scanf("%d%d%d", &t, &x1, &y1);
	scanf("%d%d%d", &t, &x2, &y2);
	scanf("%d%d%d", &t, &x3, &y3);

	center.x = (x1 + x2 + x3)/3.0;
	center.y = (y1 + y2 + y3)/3.0;

    point cur;
	cur.x = x1;
	cur.y = y1;
	S.insert(cur);

	cur.x = x2;
	cur.y = y2;
	S.insert(cur);

	cur.x = x3;
	cur.y = y3;
	S.insert(cur);

	for (int i=3; i<q; i++){
		int t, x, y;
		scanf("%d%d%d", &t, &x, &y);
		cur.x = x;
		cur.y = y;
		set<point> :: iterator it = S.upper_bound(cur);
		prev(it);
		if (t == 2){
			point p1 = *it;
			next(it);
			point p2 = *it;
//			printf("Check %lf %lf %lf %lf\n", p1.x, p1.y, p2.x, p2.y);
			if (fabs(x - center.x) < EPS && fabs(y - center.y) < EPS || !ccw(p1, cur, p2)){
				puts("YES");
			} else {
				puts("NO");
			}
		} else {
			point p1 = *it;
			next(it);
			point p2 = *it;
//			printf("Add %lf %lf %lf %lf\n", p1.x, p1.y, p2.x, p2.y);
			if (ccw(p1, cur, p2)){
//				puts("Fuck yeah");
				p1 = p2;
				next(it);
				p2 = *it;
				while (!ccw(cur, p1, p2)){
					S.erase(p1);
					p1 = p2;
					it = S.find(p1);
					if (it == S.end()){
						cerr << "FAIL 1\n";
						fprintf(stderr, "%lf %lf\n", p1.x, p1.y);
						for (set<point> :: iterator itt = S.begin(); itt != S.end(); itt++){
							fprintf(stderr, "%lf %lf\n", itt->x, itt->y);
						}
					}
					next(it);
					p2 = *it;
				}

				it = S.upper_bound(cur);
				prev(it);
				p1 = *it;
				prev(it);
				p2 = *it;
				while (!cw(cur, p1, p2)){
					S.erase(p1);
					p1 = p2;
					it = S.find(p2);
					if (it == S.end()){
						cerr << "FAIL 2\n";
					}
					prev(it);
					p2 = *it;
				}
				S.insert(cur);
			}
		}
	}
	return 0;
}