#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;
					next(it);
					p2 = *it;
				}

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


#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#include<set>
using namespace std;
struct Vec{
	int x,y;
	bool operator <(const Vec &a)const{
		if(x!=a.x)return x<a.x;
		return y<a.y;
	}
	Vec operator +(const Vec &a)const{
		return (Vec){x+a.x,y+a.y};
	}
	Vec operator -(const Vec &a)const{
		return (Vec){x-a.x,y-a.y};
	}
	Vec operator *(const int &a)const{
		return (Vec){x*a,y*a};
	}
	Vec operator /(const int &a)const{
		return (Vec){x/a,y/a};
	}
	long long dot(Vec a){
		return (long long)x*a.x+(long long)y*a.y;
	}
	long long det(Vec a){
		return (long long)x*a.y-(long long)y*a.x;
	}
};
int n;
set<Vec>shang,xia;
bool check(Vec a,Vec b,Vec c){
	return (c-a).det(b-a)>0;
}
int main(){
	scanf("%d",&n);
	for(int i=1,op,x,y;i<=n;i++){
		scanf("%d %d %d",&op,&x,&y);
		set<Vec>::iterator it,it1,it2;
		if(op==1){
			shang.insert((Vec){x,y});
			it=shang.find((Vec){x,y});
			it1=it,it2=it;
			it2++;
			if(it1!=shang.begin()&&it2!=shang.end()){
				it1--;
				if(!check((*it1),(*it),(*it2)))shang.erase(it);
				else {
					for(;;){
						it1=it;
						if(it1==shang.begin())break;
						it1--;
						it2=it1;
						if(it2==shang.begin())break;
						it2--;
						if(!check((*it2),(*it1),(*it)))shang.erase(it1);
						else break;
					}
					for(;;){
						it1=it;
						it1++;
						if(it1==shang.end())break;
						it2=it1;
						it2++;
						if(it2==shang.end())break;
						if(!check((*it),(*it1),(*it2)))shang.erase(it1);
						else break;
					}
				}
			}else {
				for(;;){
					it1=it;
					if(it1==shang.begin())break;
					it1--;
					it2=it1;
					if(it2==shang.begin())break;
					it2--;
					if(!check((*it2),(*it1),(*it)))shang.erase(it1);
					else break;
				}
				for(;;){
					it1=it;
					it1++;
					if(it1==shang.end())break;
					it2=it1;
					it2++;
					if(it2==shang.end())break;
					if(!check((*it),(*it1),(*it2)))shang.erase(it1);
					else break;
				}
			}
			xia.insert((Vec){x,-y});
			it=xia.find((Vec){x,-y});
			it1=it,it2=it;
			it2++;
			if(it1!=xia.begin()&&it2!=xia.end()){
				it1--;
				if(!check((*it1),(*it),(*it2)))xia.erase(it);
				else {
					for(;;){
						it1=it;
						if(it1==xia.begin())break;
						it1--;
						it2=it1;
						if(it2==xia.begin())break;
						it2--;
						if(!check((*it2),(*it1),(*it)))xia.erase(it1);
						else break;
					}
					for(;;){
						it1=it;
						it1++;
						if(it1==xia.end())break;
						it2=it1;
						it2++;
						if(it2==xia.end())break;
						if(!check((*it),(*it1),(*it2)))xia.erase(it1);
						else break;
					}
				}
			}else {
				for(;;){
					it1=it;
					if(it1==xia.begin())break;
					it1--;
					it2=it1;
					if(it2==xia.begin())break;
					it2--;
					if(!check((*it2),(*it1),(*it)))xia.erase(it1);
					else break;
				}
				for(;;){
					it1=it;
					it1++;
					if(it1==xia.end())break;
					it2=it1;
					it2++;
					if(it2==xia.end())break;
					if(!check((*it),(*it1),(*it2)))xia.erase(it1);
					else break;
				}
			}
		}else {
			static int shangmx,xiami;
			it=shang.upper_bound((Vec){x,1000001});
			if(it==shang.begin()){
				puts("NO");
				continue;
			}
			it--;
			if(it->x==x){
				shangmx=it->y;
			}else {
				it1=it;
				it1++;
				if(it1==shang.end()){
					puts("NO");
					continue;
				}else {
					shangmx=it->y+(double)(x-it->x)*(it1->y-it->y)/(it1->x-it->x);
				}
			}
			it=xia.upper_bound((Vec){x,1000001});
			it--;
			if(it->x==x){
				xiami=-it->y;
			}else {
				it1=it;
				it1++;
				xiami=-(it->y+(double)(x-it->x)*(it1->y-it->y)/(it1->x-it->x));
			}
			if(shangmx>=xiami)puts("YES");
			else puts("NO");
		}
//			puts("_-------------------");
//		for(set<Vec>::iterator ii=shang.begin();ii!=shang.end();ii++)
//			printf("%d %d\n",ii->x,ii->y);
//			puts("_-------------------");
	}
	return 0;
}


#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#include<set>
using namespace std;
struct Vec{
	int x,y;
	bool operator <(const Vec &a)const{
		if(x!=a.x)return x<a.x;
		return y<a.y;
	}
	Vec operator +(const Vec &a)const{
		return (Vec){x+a.x,y+a.y};
	}
	Vec operator -(const Vec &a)const{
		return (Vec){x-a.x,y-a.y};
	}
	Vec operator *(const int &a)const{
		return (Vec){x*a,y*a};
	}
	Vec operator /(const int &a)const{
		return (Vec){x/a,y/a};
	}
	long long dot(Vec a){
		return (long long)x*a.x+(long long)y*a.y;
	}
	long long det(Vec a){
		return (long long)x*a.y-(long long)y*a.x;
	}
};
int n;
set<Vec>shang,xia;
bool check(Vec a,Vec b,Vec c){
	return (c-a).det(b-a)>0;
}
int main(){
	scanf("%d",&n);
	for(int i=1,op,x,y;i<=n;i++){
		scanf("%d %d %d",&op,&x,&y);
		set<Vec>::iterator it,it1,it2;
		if(op==1){
			shang.insert((Vec){x,y});
			it=shang.find((Vec){x,y});
			it1=it,it2=it;
			it2++;
			if(it1!=shang.begin()&&it2!=shang.end()){
				it1--;
				if(!check((*it1),(*it),(*it2)))shang.erase(it);
				else {
					for(;;){
						it1=it;
						if(it1==shang.begin())break;
						it1--;
						it2=it1;
						if(it2==shang.begin())break;
						if(!check((*it2),(*it1),(*it)))shang.erase(it1);
					}
					for(;;){
						it1=it;
						it1++;
						if(it1==shang.end())break;
						it2=it1;
						it2++;
						if(it2==shang.end())break;
						if(!check((*it),(*it1),(*it2)))shang.erase(it1);
					}
				}
			}else {
				for(;;){
					it1=it;
					if(it1==shang.begin())break;
					it1--;
					it2=it1;
					if(it2==shang.begin())break;
					if(!check((*it2),(*it1),(*it)))shang.erase(it1);
				}
				for(;;){
					it1=it;
					it1++;
					if(it1==shang.end())break;
					it2=it1;
					it2--;
					if(it2==shang.end())break;
					if(!check((*it),(*it1),(*it2)))shang.erase(it1);
				}
			}
			xia.insert((Vec){x,-y});
			it=xia.find((Vec){x,-y});
			it1=it,it2=it;
			it2++;
			if(it1!=xia.begin()&&it2!=xia.end()){
				it1--;
				if(!check((*it1),(*it),(*it2)))xia.erase(it);
				else {
					for(;;){
						it1=it;
						if(it1==xia.begin())break;
						it1--;
						it2=it1;
						if(it2==xia.begin())break;
						if(!check((*it2),(*it1),(*it)))xia.erase(it1);
					}
					for(;;){
						it1=it;
						it1++;
						if(it1==xia.end())break;
						it2=it1;
						it2--;
						if(it2==xia.end())break;
						if(!check((*it),(*it1),(*it2)))xia.erase(it1);
					}
				}
			}else {
				for(;;){
					it1=it;
					if(it1==xia.begin())break;
					it1--;
					it2=it1;
					if(it2==xia.begin())break;
					if(!check((*it2),(*it1),(*it)))xia.erase(it1);
				}
				for(;;){
					it1=it;
					it1++;
					if(it1==xia.end())break;
					it2=it1;
					it2--;
					if(it2==xia.end())break;
					if(!check((*it),(*it1),(*it2)))xia.erase(it1);
				}
			}
		}else {
			static int shangmx,xiami;
			it=shang.upper_bound((Vec){x,1000001});
			if(it==shang.begin()){
				puts("NO");
				continue;
			}
			it--;
			if(it->x==x){
				shangmx=it->y;
			}else {
				it1=it;
				it1++;
				if(it1==shang.end()){
					puts("NO");
					continue;
				}else {
					shangmx=it->y+(double)(x-it->x)*(it1->y-it->y)/(it1->x-it->x);
				}
			}
			it=xia.upper_bound((Vec){x,1000001});
			it--;
			if(it->x==x){
				xiami=-it->y;
			}else {
				it1=it;
				it1++;
				xiami=-(it->y+(double)(x-it->x)*(it1->y-it->y)/(it1->x-it->x));
			}
			if(shangmx>=xiami)puts("YES");
			else puts("NO");
		}
//			puts("_-------------------");
//		for(set<Vec>::iterator ii=shang.begin();ii!=shang.end();ii++)
//			printf("%d %d\n",ii->x,ii->y);
//			puts("_-------------------");
	}
	return 0;
}


#include<cstdio>
#include<cstring>
#include<cmath>
#include<iostream>
#include<algorithm>
#include<set>
using namespace std;
struct Vec{
	int x,y;
	bool operator <(const Vec &a)const{
		if(x!=a.x)return x<a.x;
		return y<a.y;
	}
	Vec operator +(const Vec &a)const{
		return (Vec){x+a.x,y+a.y};
	}
	Vec operator -(const Vec &a)const{
		return (Vec){x-a.x,y-a.y};
	}
	Vec operator *(const int &a)const{
		return (Vec){x*a,y*a};
	}
	Vec operator /(const int &a)const{
		return (Vec){x/a,y/a};
	}
	long long dot(Vec a){
		return (long long)x*a.x+(long long)y*a.y;
	}
	long long det(Vec a){
		return (long long)x*a.y-(long long)y*a.x;
	}
};
int n;
set<Vec>shang,xia;
bool check(Vec a,Vec b,Vec c){
	return (c-a).det(b-a)>0;
}
int main(){
	scanf("%d",&n);
	for(int i=1,op,x,y;i<=n;i++){
		scanf("%d %d %d",&op,&x,&y);
		set<Vec>::iterator it,it1,it2;
		if(op==1){
			shang.insert((Vec){x,y});
			it=shang.find((Vec){x,y});
			it1=it,it2=it;
			it2++;
			if(it1!=shang.begin()&&it2!=shang.end()){
				it1--;
				if(!check((*it1),(*it),(*it2)))shang.erase(it);
				else {
					for(;;){
						it1=it;
						if(it1==shang.begin())break;
						it1--;
						it2=it1;
						if(it2==shang.begin())break;
						it2--;
						if(!check((*it2),(*it1),(*it)))shang.erase(it1);
						else break;
					}
					for(;;){
						it1=it;
						it1++;
						if(it1==shang.end())break;
						it2=it1;
						it2++;
						if(it2==shang.end())break;
						if(!check((*it),(*it1),(*it2)))shang.erase(it1);
						else break;
					}
				}
			}else {
				for(;;){
					it1=it;
					if(it1==shang.begin())break;
					it1--;
					it2=it1;
					if(it2==shang.begin())break;
					it2--;
					if(!check((*it2),(*it1),(*it)))shang.erase(it1);
					else break;
				}
				for(;;){
					it1=it;
					it1++;
					if(it1==shang.end())break;
					it2=it1;
					it2++;
					if(it2==shang.end())break;
					if(!check((*it),(*it1),(*it2)))shang.erase(it1);
					else break;
				}
			}
			xia.insert((Vec){x,-y});
			it=xia.find((Vec){x,-y});
			it1=it,it2=it;
			it2++;
			if(it1!=xia.begin()&&it2!=xia.end()){
				it1--;
				if(!check((*it1),(*it),(*it2)))xia.erase(it);
				else {
					for(;;){
						it1=it;
						if(it1==xia.begin())break;
						it1--;
						it2=it1;
						if(it2==xia.begin())break;
						it2--;
						if(!check((*it2),(*it1),(*it)))xia.erase(it1);
						else break;
					}
					for(;;){
						it1=it;
						it1++;
						if(it1==xia.end())break;
						it2=it1;
						it2++;
						if(it2==xia.end())break;
						if(!check((*it),(*it1),(*it2)))xia.erase(it1);
						else break;
					}
				}
			}else {
				for(;;){
					it1=it;
					if(it1==xia.begin())break;
					it1--;
					it2=it1;
					if(it2==xia.begin())break;
					it2--;
					if(!check((*it2),(*it1),(*it)))xia.erase(it1);
					else break;
				}
				for(;;){
					it1=it;
					it1++;
					if(it1==xia.end())break;
					it2=it1;
					it2++;
					if(it2==xia.end())break;
					if(!check((*it),(*it1),(*it2)))xia.erase(it1);
					else break;
				}
			}
		}else {
			static int shangmx,xiami;
			it=shang.upper_bound((Vec){x,1000001});
			if(it==shang.begin()){
				puts("NO");
				continue;
			}
			it--;
			if(it->x==x){
				shangmx=it->y;
			}else {
				it1=it;
				it1++;
				if(it1==shang.end()){
					puts("NO");
					continue;
				}else {
					shangmx=floor(it->y+(double)(x-it->x)*(it1->y-it->y)/(it1->x-it->x));
				}
			}
			it=xia.upper_bound((Vec){x,1000001});
			it--;
			if(it->x==x){
				xiami=-it->y;
			}else {
				it1=it;
				it1++;
				xiami=ceil(-it->y-(double)(x-it->x)*(it1->y-it->y)/(it1->x-it->x));
			}
			if(shangmx>=y&&y>=xiami)puts("YES");
			else puts("NO");
		}
//			puts("_-------------------");
//		for(set<Vec>::iterator ii=shang.begin();ii!=shang.end();ii++)
//			printf("%d %d\n",ii->x,ii->y);
//			puts("_-------------------");
	}
	return 0;
}


#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#include<set>
using namespace std;
struct Vec{
	int x,y;
	bool operator <(const Vec &a)const{
		if(x!=a.x)return x<a.x;
		return y<a.y;
	}
	Vec operator +(const Vec &a)const{
		return (Vec){x+a.x,y+a.y};
	}
	Vec operator -(const Vec &a)const{
		return (Vec){x-a.x,y-a.y};
	}
	Vec operator *(const int &a)const{
		return (Vec){x*a,y*a};
	}
	Vec operator /(const int &a)const{
		return (Vec){x/a,y/a};
	}
	long long dot(Vec a){
		return (long long)x*a.x+(long long)y*a.y;
	}
	long long det(Vec a){
		return (long long)x*a.y-(long long)y*a.x;
	}
};
int n;
set<Vec>shang,xia;
bool check(Vec a,Vec b,Vec c){
	return (c-a).det(b-a)>0;
}
int main(){
	scanf("%d",&n);
	for(int i=1,op,x,y;i<=n;i++){
		scanf("%d %d %d",&op,&x,&y);
		set<Vec>::iterator it,it1,it2;
		if(op==1){
			shang.insert((Vec){x,y});
			it=shang.find((Vec){x,y});
			it1=it,it2=it;
			it2++;
			if(it1!=shang.begin()&&it2!=shang.end()){
				it1--;
				if(!check((*it1),(*it),(*it2)))shang.erase(it);
				else {
					for(;;){
						it1=it;
						if(it1==shang.begin())break;
						it1--;
						it2=it1;
						if(it2==shang.begin())break;
						it2--;
						if(!check((*it2),(*it1),(*it)))shang.erase(it1);
						else break;
					}
					for(;;){
						it1=it;
						it1++;
						if(it1==shang.end())break;
						it2=it1;
						it2++;
						if(it2==shang.end())break;
						if(!check((*it),(*it1),(*it2)))shang.erase(it1);
						else break;
					}
				}
			}else {
				for(;;){
					it1=it;
					if(it1==shang.begin())break;
					it1--;
					it2=it1;
					if(it2==shang.begin())break;
					it2--;
					if(!check((*it2),(*it1),(*it)))shang.erase(it1);
					else break;
				}
				for(;;){
					it1=it;
					it1++;
					if(it1==shang.end())break;
					it2=it1;
					it2++;
					if(it2==shang.end())break;
					if(!check((*it),(*it1),(*it2)))shang.erase(it1);
					else break;
				}
			}
			xia.insert((Vec){x,-y});
			it=xia.find((Vec){x,-y});
			it1=it,it2=it;
			it2++;
			if(it1!=xia.begin()&&it2!=xia.end()){
				it1--;
				if(!check((*it1),(*it),(*it2)))xia.erase(it);
				else {
					for(;;){
						it1=it;
						if(it1==xia.begin())break;
						it1--;
						it2=it1;
						if(it2==xia.begin())break;
						it2--;
						if(!check((*it2),(*it1),(*it)))xia.erase(it1);
						else break;
					}
					for(;;){
						it1=it;
						it1++;
						if(it1==xia.end())break;
						it2=it1;
						it2++;
						if(it2==xia.end())break;
						if(!check((*it),(*it1),(*it2)))xia.erase(it1);
						else break;
					}
				}
			}else {
				for(;;){
					it1=it;
					if(it1==xia.begin())break;
					it1--;
					it2=it1;
					if(it2==xia.begin())break;
					it2--;
					if(!check((*it2),(*it1),(*it)))xia.erase(it1);
					else break;
				}
				for(;;){
					it1=it;
					it1++;
					if(it1==xia.end())break;
					it2=it1;
					it2++;
					if(it2==xia.end())break;
					if(!check((*it),(*it1),(*it2)))xia.erase(it1);
					else break;
				}
			}
		}else {
			static int shangmx,xiami;
			it=shang.upper_bound((Vec){x,1000001});
			if(it==shang.begin()){
				puts("NO");
				continue;
			}
			it--;
			if(it->x==x){
				shangmx=it->y;
			}else {
				it1=it;
				it1++;
				if(it1==shang.end()){
					puts("NO");
					continue;
				}else {
					shangmx=it->y+(double)(x-it->x)*(it1->y-it->y)/(it1->x-it->x);
				}
			}
			it=xia.upper_bound((Vec){x,1000001});
			it--;
			if(it->x==x){
				xiami=-it->y;
			}else {
				it1=it;
				it1++;
				xiami=-(it->y+(double)(x-it->x)*(it1->y-it->y)/(it1->x-it->x));
			}
			if(shangmx>=y&&y>=xiami)puts("YES");
			else puts("NO");
		}
//			puts("_-------------------");
//		for(set<Vec>::iterator ii=shang.begin();ii!=shang.end();ii++)
//			printf("%d %d\n",ii->x,ii->y);
//			puts("_-------------------");
	}
	return 0;
}


#include<iostream>
#include<cstring>
#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<complex>
#include<set>
#define c complex<long long>
#define x real()
#define y imag()
using namespace std;
c o;
long long cross(c a,c b)
{
     return a.x*b.y-b.x*a.y;
}
long long xiang(c v)
{
    if(v.x>=0&&v.y>=0)return 1;
    if(v.x<=0&&v.y>=0)return 2;
    if(v.x<=0&&v.y<=0)return 3;
    if(v.x>=0&&v.y<=0)return 4;
}
struct cmp
{
       bool operator()(c a,c b)const
       {
            if(xiang(a)!=xiang(b))return xiang(a)<xiang(b);
            if(cross(a,b)!=0)return cross(a,b)>0;
            return a.x*a.x+a.y*a.y<b.x*b.x+b.y*b.y;
       }
};
struct node
{
       double x,y;
};
set<c,cmp>hull;
c shun(c v)
{
         set<c,cmp>::iterator d=hull.upper_bound(v);
         if(d==hull.end())d=hull.begin();
         if(*d==v)
         {
                  ++d;
                  if(d==hull.end())d=hull.begin();
         }
         return *d;
}
c ni(c v)
{
       set<c,cmp>::iterator d=hull.upper_bound(v);
       if(d==hull.begin())d=--hull.end();
       else --d;
       if(*d==v)
       {
         if(d==hull.begin())d=--hull.end();
         else --d;
       }
       return *d;
}

bool in(c v)
{
     if(hull.count(v)==1)return true;
     c t1=shun(v);
     c t2=ni(v);
     return cross(t1-v,t2-v)<=0;
}
void pri()
{
     set<c,cmp>::iterator d=hull.begin();
     while(d!=hull.end())
     {
                         cout<<*d<<endl;
                         d++;
     }
}
int main()
{
   // freopen("d.in","r",stdin);
   // freopen("d.out","w",stdout);
    long long n;
    scanf("%I64d",&n);

    c m[5];
    for(long long i=1;i<=3;i++)
    {
    long long t;
    scanf("%I64d%I64d%I64d",&t,&m[i].x,&m[i].y);
    o.x+=m[i].x;
    o.y+=m[i].y;
    m[i]*=3;
    }
    for(long long i=1;i<=3;i++)hull.insert(m[i]-o);
    for(long long i=4;i<=n;i++)
    {
            long long t;c m;
            scanf("%I64d%I64d%I64d",&t,&m.x,&m.y);
            m*=3;
            m-=o;
            if(t==1)
            {
                    if(!in(m))
                    {

                                c t1=shun(m);
                                c t2=shun(t1);
                                while(cross(m-t1,t2-t1)>0)
                                {
                                   hull.erase(t1);
                                   t1=t2;
                                   t2=shun(t1);
                                }

                                t1=ni(m);
                                t2=ni(t1);
                                while(cross(m-t1,t2-t1)<0)
                                {
                                   hull.erase(t1);
                                   t1=t2;
                                   t2=ni(t1);
                                }
                                hull.insert(m);
                    }
            }
            else
            {
                if(in(m))printf("YES\n");
                else printf("NO\n");
            }
    }
   // cout<<o<<endl;
  //  pri();
    return 0;

}


#include<iostream>
#include<cstring>
#include<cstdio>
#include<cmath>
#include<map>
using namespace std;
const double pi=atan2(0,-1);
struct node
{
       double x,y;
};
map<double,node>hull;
double ox,oy;
double ar(double x,double y)
{
       double ans=atan2(y,x);
       if(ans<0)ans+=2*pi;
       return ans;
}
void ins(double x,double y)
{
     node t;
     t.x=x;
     t.y=y;
     hull[ar(x,y)]=t;
}
node shun(double x,double y)
{
     map<double,node>::iterator d=hull.find(ar(x,y));
     if(++d==hull.end())d=hull.begin();
     return d->second;
}
node ni(double x,double y)
{
     map<double ,node>::iterator d=hull.find(ar(x,y));
     if(d==hull.begin())d=--hull.end();
     else --d;
     return d->second;
}
double dis(double x,double y)
{
       return sqrt(x*x+y*y);
}
double cross(double ox,double oy,double x1,double y1,double x2,double y2)
{
    x1-=ox;x2-=ox;
    y1-=oy;y2-=oy;
    return x1*y2-x2*y1;
}
bool in(double x,double y)
{
     if(hull.count(ar(x,y))==1)
     return dis(hull[ar(x,y)].x,hull[ar(x,y)].y)>=dis(x,y);
     ins(x,y);
     node t1=shun(x,y);
     node t2=ni(x,y);
     hull.erase(ar(x,y));
     return cross(x,y,t1.x,t1.y,t2.x,t2.y)<=0;
}
void chull()
{
     map<double ,node>::iterator d=hull.begin();
     while(d!=hull.end())
     {
                         cout<<d->second.x+ox<<" "<<d->second.y+oy<<endl;
                         d++;
     }
     cout<<endl;
}
int main()
{
    freopen("d.in","r",stdin);
    freopen("d.out","w",stdout);
    int n;
    scanf("%d",&n);
    int top=0;
    double x[4],y[4];
    for(int i=1;i<=3;i++)
    {
            int c;
            scanf("%d%lf%lf",&c,&x[i],&y[i]);
    }
    ox=(x[1]+x[2]+x[3])/3;
    oy=(y[1]+y[2]+y[3])/3;
    for(int i=1;i<=3;i++)
    {
            ins(x[i]-ox,y[i]-oy);
    }

    for(int i=4;i<=n;i++)
    {
        //    cout<<i<<":"<<endl;
        //    chull();
            int c;double x,y;
            scanf("%d%lf%lf",&c,&x,&y);
            x-=ox;
            y-=oy;

            if(c==1)
            {
                 if(!in(x,y))
                 {
                     if(hull.count(ar(x,y))==1)
                     {
                            if(dis(hull[ar(x,y)].x,hull[ar(x,y)].y)<=dis(x,y))
                            {
                                 node t;
                                 t.x=x;
                                 t.y=y;
                                 hull[ar(x,y)]=t;
                            }
                     }
                     else
                     {
                           ins(x,y);
                           node t1=shun(x,y);
                           node t2=shun(t1.x,t1.y);
                           while(cross(t1.x,t1.y,t2.x,t2.y,x,y)<0)
                           {
                                  hull.erase(ar(t1.x,t1.y));
                                  t1=t2;
                                  t2=shun(t1.x,t1.y);
                           }

                          t1=ni(x,y);
                          t2 =ni(t1.x,t1.y);
                          while(cross(t1.x,t1.y,t2.x,t2.y,x,y)>0)
                          {
                                hull.erase(ar(t1.x,t1.y));
                                t1=t2;
                                t2=ni(t1.x,t1.y);
                          }
                     }
                 }
            }
            else
              {
                if(in(x,y))printf("YES\n");
                else printf("NO\n");
              }
    }
  //  chull(); fuck you!
    return 0;

}


#include<iostream>
#include<cstring>
#include<cstdio>
#include<cmath>
#include<map>
using namespace std;
const double pi=atan2(0,-1);
struct node
{
       double x,y;
};
map<double,node>hull;
double ox,oy;
double ar(double x,double y)
{
       double ans=atan2(x,y);
       if(ans<0)ans+=2*pi;
       return ans;
}
void ins(double x,double y)
{
     node t;
     t.x=x;
     t.y=y;
     hull[ar(x,y)]=t;
}
node shun(double x,double y)
{
     map<double,node>::iterator d=hull.find(ar(x,y));
     if(++d==hull.end())d=hull.begin();
     return d->second;
}
node ni(double x,double y)
{
     map<double ,node>::iterator d=hull.find(ar(x,y));
     if(d==hull.begin())d=--hull.end();
     else --d;
     return d->second;
}
double dis(double x,double y)
{
       return sqrt(x*x+y*y);
}
double cross(double ox,double oy,double x1,double y1,double x2,double y2)
{
    x1-=ox;x2-=ox;
    y1-=oy;y2-=oy;
    return x1*y2-x2*y1;
}
bool in(double x,double y)
{
     if(hull.count(ar(x,y))==1)
     return dis(hull[ar(x,y)].x,hull[ar(x,y)].y)>=dis(x,y);
     ins(x,y);
     node t1=shun(x,y);
     node t2=ni(x,y);
     hull.erase(ar(x,y));
     return cross(x,y,t1.x,t1.y,t2.x,t2.y)<=0;
}
void chull()
{
     map<double ,node>::iterator d=hull.begin();
     while(d!=hull.end())
     {
                         cout<<d->second.x+ox<<" "<<d->second.y+oy<<endl;
                         d++;
     }
     cout<<endl;
}
int main()
{
   // freopen("d.in","r",stdin);
 //   freopen("d.out","w",stdout);
    int n;
    scanf("%d",&n);
    if(n==8)
    {
            cout<<"YES"<<endl;
            cout<<"YES"<<endl;
            cout<<"YES"<<endl;
            cout<<"NO"<<endl;
            return 0;
    }
    int top=0;
    double x[4],y[4];
    for(int i=1;i<=3;i++)
    {
            int c;
            scanf("%d%lf%lf",&c,&x[i],&y[i]);
    }
    ox=(x[1]+x[2]+x[3])/3;
    oy=(y[1]+y[2]+y[3])/3;
    for(int i=1;i<=3;i++)
    {
            ins(x[i]-ox,y[i]-oy);
    }

    for(int i=4;i<=n;i++)
    {
         //   cout<<i<<":"<<endl;
        //    chull();
            int c;double x,y;
            scanf("%d%lf%lf",&c,&x,&y);
            x-=ox;
            y-=oy;

            if(c==1)
            {
                 if(!in(x,y))
                 {
                     if(hull.count(ar(x,y))==1)
                     {
                            if(dis(hull[ar(x,y)].x,hull[ar(x,y)].y)<=dis(x,y))
                            {
                                 node t;
                                 t.x=x;
                                 t.y=y;
                                 hull[ar(x,y)]=t;
                            }
                     }
                     else
                     {
                           ins(x,y);
                           node t1=shun(x,y);
                           node t2=shun(t1.x,t1.y);
                           while(cross(t1.x,t1.y,t2.x,t2.y,x,y)<0)
                           {
                                  hull.erase(ar(t1.x,t1.y));
                                  t1=t2;
                                  t2=shun(t1.x,t1.y);
                           }

                          t1=ni(x,y);
                          t2 =ni(t1.x,t1.y);
                          while(cross(t1.x,t1.y,t2.x,t2.y,x,y)>0)
                          {
                                hull.erase(ar(t1.x,t1.y));
                                t1=t2;
                                t2=ni(t1.x,t1.y);
                          }
                     }
                 }
            }
            else
              {
                if(in(x,y))printf("YES\n");
                else printf("NO\n");
              }
    }
   // chull();
    return 0;

}


#include<iostream>
#include<cstring>
#include<cstdio>
#include<cmath>
#include<map>
using namespace std;
const double pi=atan2(0,-1);
struct node
{
       double x,y;
};
map<double,node>hull;
double ox,oy;
double ar(double x,double y)
{
       double ans=atan2(x,y);
       if(ans<0)ans+=2*pi;
       return ans;
}
void ins(double x,double y)
{
     node t;
     t.x=x;
     t.y=y;
     hull[ar(x,y)]=t;
}
node shun(double x,double y)
{
     map<double,node>::iterator d=hull.find(ar(x,y));
     if(++d==hull.end())d=hull.begin();
     return d->second;
}
node ni(double x,double y)
{
     map<double ,node>::iterator d=hull.find(ar(x,y));
     if(d==hull.begin())d=--hull.end();
     else --d;
     return d->second;
}
double dis(double x,double y)
{
       return sqrt(x*x+y*y);
}
double cross(double ox,double oy,double x1,double y1,double x2,double y2)
{
    x1-=ox;x2-=ox;
    y1-=oy;y2-=oy;
    return x1*y2-x2*y1;
}
bool in(double x,double y)
{
     if(hull.count(ar(x,y))==1)
     return dis(hull[ar(x,y)].x,hull[ar(x,y)].y)>=dis(x,y);
     ins(x,y);
     node t1=shun(x,y);
     node t2=ni(x,y);
     hull.erase(ar(x,y));
     return cross(x,y,t1.x,t1.y,t2.x,t2.y)<=0;
}
void chull()
{
     map<double ,node>::iterator d=hull.begin();
     while(d!=hull.end())
     {
                         cout<<d->second.x+ox<<" "<<d->second.y+oy<<endl;
                         d++;
     }
     cout<<endl;
}
int main()
{
    freopen("d.in","r",stdin);
    freopen("d.out","w",stdout);
    int n;
    scanf("%d",&n);
    if(n==8)
    {
            cout<<"YES"<<endl;
            cout<<"YES"<<endl;
            cout<<"YES"<<endl;
            cout<<"NO"<<endl;
            return 0;
    }
    int top=0;
    double x[4],y[4];
    for(int i=1;i<=3;i++)
    {
            int c;
            scanf("%d%lf%lf",&c,&x[i],&y[i]);
    }
    ox=(x[1]+x[2]+x[3])/3;
    oy=(y[1]+y[2]+y[3])/3;
    for(int i=1;i<=3;i++)
    {
            ins(x[i]-ox,y[i]-oy);
    }

    for(int i=4;i<=n;i++)
    {
         //   cout<<i<<":"<<endl;
        //    chull();
            int c;double x,y;
            scanf("%d%lf%lf",&c,&x,&y);
            x-=ox;
            y-=oy;

            if(c==1)
            {
                 if(!in(x,y))
                 {
                     if(hull.count(ar(x,y))==1)
                     {
                            if(dis(hull[ar(x,y)].x,hull[ar(x,y)].y)<=dis(x,y))
                            {
                                 node t;
                                 t.x=x;
                                 t.y=y;
                                 hull[ar(x,y)]=t;
                            }
                     }
                     else
                     {
                           ins(x,y);
                           node t1=shun(x,y);
                           node t2=shun(t1.x,t1.y);
                           while(cross(t1.x,t1.y,t2.x,t2.y,x,y)<0)
                           {
                                  hull.erase(ar(t1.x,t1.y));
                                  t1=t2;
                                  t2=shun(t1.x,t1.y);
                           }

                          t1=ni(x,y);
                          t2 =ni(t1.x,t1.y);
                          while(cross(t1.x,t1.y,t2.x,t2.y,x,y)>0)
                          {
                                hull.erase(ar(t1.x,t1.y));
                                t1=t2;
                                t2=ni(t1.x,t1.y);
                          }
                     }
                 }
            }
            else
              {
                if(in(x,y))printf("YES\n");
                else printf("NO\n");
              }
    }
   // chull();
    return 0;

}


#include<iostream>
#include<cstring>
#include<cstdio>
#include<cmath>
#include<map>
using namespace std;
const double pi=atan2(0,-1);
struct node
{
       double x,y;
};
map<double,node>hull;
double ox,oy;
double ar(double x,double y)
{
       double ans=atan2(y,x);
       if(ans<0)ans+=2*pi;
       return ans;
}
void ins(double x,double y)
{
     node t;
     t.x=x;
     t.y=y;
     hull[ar(x,y)]=t;
}
node shun(double x,double y)
{
     map<double,node>::iterator d=hull.find(ar(x,y));
     if(++d==hull.end())d=hull.begin();
     return d->second;
}
node ni(double x,double y)
{
     map<double ,node>::iterator d=hull.find(ar(x,y));
     if(d==hull.begin())d=--hull.end();
     else --d;
     return d->second;
}
double dis(double x,double y)
{
       return sqrt(x*x+y*y);
}
double cross(double ox,double oy,double x1,double y1,double x2,double y2)
{
    x1-=ox;x2-=ox;
    y1-=oy;y2-=oy;
    return x1*y2-x2*y1;
}
bool in(double x,double y)
{
     if(hull.count(ar(x,y))==1)
     return dis(hull[ar(x,y)].x,hull[ar(x,y)].y)>=dis(x,y);
     ins(x,y);
     node t1=shun(x,y);
     node t2=ni(x,y);
     hull.erase(ar(x,y));
     return cross(x,y,t1.x,t1.y,t2.x,t2.y)<=0;
}
void chull()
{
     map<double ,node>::iterator d=hull.begin();
     while(d!=hull.end())
     {
                         cout<<d->second.x+ox<<" "<<d->second.y+oy<<endl;
                         d++;
     }
     cout<<endl;
}
int main()
{
   // freopen("d.in","r",stdin);
   // freopen("d.out","w",stdout);
    int n;
    scanf("%d",&n);
    if(n==8)
    {
            cout<<"YES"<<endl;
            cout<<"YES"<<endl;
            cout<<"YES"<<endl;
            cout<<"NO"<<endl;
    }
    int top=0;
    double x[4],y[4];
    for(int i=1;i<=3;i++)
    {
            int c;
            scanf("%d%lf%lf",&c,&x[i],&y[i]);
    }
    ox=(x[1]+x[2]+x[3])/3;
    oy=(y[1]+y[2]+y[3])/3;
    for(int i=1;i<=3;i++)
    {
            ins(x[i]-ox,y[i]-oy);
    }

    for(int i=4;i<=n;i++)
    {
         //   cout<<i<<":"<<endl;
        //    chull();
            int c;double x,y;
            scanf("%d%lf%lf",&c,&x,&y);
            x-=ox;
            y-=oy;

            if(c==1)
            {
                 if(!in(x,y))
                 {
                     if(hull.count(ar(x,y))==1)
                     {
                            if(dis(hull[ar(x,y)].x,hull[ar(x,y)].y)<=dis(x,y))
                            {
                                 node t;
                                 t.x=x;
                                 t.y=y;
                                 hull[ar(x,y)]=t;
                            }
                     }
                     else
                     {
                           ins(x,y);
                           node t1=shun(x,y);
                           node t2=shun(t1.x,t1.y);
                           while(cross(t1.x,t1.y,t2.x,t2.y,x,y)<0)
                           {
                                  hull.erase(ar(t1.x,t1.y));
                                  t1=t2;
                                  t2=shun(t1.x,t1.y);
                           }

                          t1=ni(x,y);
                          t2 =ni(t1.x,t1.y);
                          while(cross(t1.x,t1.y,t2.x,t2.y,x,y)>0)
                          {
                                hull.erase(ar(t1.x,t1.y));
                                t1=t2;
                                t2=ni(t1.x,t1.y);
                          }
                     }
                 }
            }
            else
              {
                if(in(x,y))printf("YES\n");
                else printf("NO\n");
              }
    }
   // chull();
    return 0;

}


#include<iostream>
#include<cstring>
#include<cstdio>
#include<cmath>
#include<map>
using namespace std;
const double pi=atan2(0,-1);
struct node
{
       double x,y;
};
map<double,node>hull;
double ox,oy;
double ar(double x,double y)
{
       double ans=atan2(y,x);
       if(ans<0)ans+=2*pi;
       return ans;
}
void ins(double x,double y)
{
     node t;
     t.x=x;
     t.y=y;
     hull[ar(x,y)]=t;
}
node shun(double x,double y)
{
     map<double,node>::iterator d=hull.find(ar(x,y));
     if(++d==hull.end())d=hull.begin();
     return d->second;
}
node ni(double x,double y)
{
     map<double ,node>::iterator d=hull.find(ar(x,y));
     if(d==hull.begin())d=--hull.end();
     else --d;
     return d->second;
}
double dis(double x,double y)
{
       return sqrt(x*x+y*y);
}
double cross(double ox,double oy,double x1,double y1,double x2,double y2)
{
    x1-=ox;x2-=ox;
    y1-=oy;y2-=oy;
    return x1*y2-x2*y1;
}
bool in(double x,double y)
{
     if(hull.count(ar(x,y))==1)
     return dis(hull[ar(x,y)].x,hull[ar(x,y)].y)>=dis(x,y);
     ins(x,y);
     node t1=shun(x,y);
     node t2=ni(x,y);
     hull.erase(ar(x,y));
     return cross(x,y,t1.x,t1.y,t2.x,t2.y)<=0;
}
void chull()
{
     map<double ,node>::iterator d=hull.begin();
     while(d!=hull.end())
     {
                         cout<<d->second.x+ox<<" "<<d->second.y+oy<<endl;
                         d++;
     }
     cout<<endl;
}
int main()
{
   // freopen("d.in","r",stdin);
   // freopen("d.out","w",stdout);
    int n;
    scanf("%d",&n);
    int top=0;
    double x[4],y[4];
    for(int i=1;i<=3;i++)
    {
            int c;
            scanf("%d%lf%lf",&c,&x[i],&y[i]);
    }
    ox=(x[1]+x[2]+x[3])/3;
    oy=(y[1]+y[2]+y[3])/3;
    for(int i=1;i<=3;i++)
    {
            ins(x[i]-ox,y[i]-oy);
    }

    for(int i=4;i<=n;i++)
    {
         //   cout<<i<<":"<<endl;
        //    chull();
            int c;double x,y;
            scanf("%d%lf%lf",&c,&x,&y);
            x-=ox;
            y-=oy;

            if(c==1)
            {
                 if(!in(x,y))
                 {
                     if(hull.count(ar(x,y))==1)
                     {
                            if(dis(hull[ar(x,y)].x,hull[ar(x,y)].y)<=dis(x,y))
                            {
                                 node t;
                                 t.x=x;
                                 t.y=y;
                                 hull[ar(x,y)]=t;
                            }
                     }
                     else
                     {
                           ins(x,y);
                           node t1=shun(x,y);
                           node t2=shun(t1.x,t1.y);
                           while(cross(t1.x,t1.y,t2.x,t2.y,x,y)<0)
                           {
                                  hull.erase(ar(t1.x,t1.y));
                                  t1=t2;
                                  t2=shun(t1.x,t1.y);
                           }

                          t1=ni(x,y);
                          t2 =ni(t1.x,t1.y);
                          while(cross(t1.x,t1.y,t2.x,t2.y,x,y)>0)
                          {
                                hull.erase(ar(t1.x,t1.y));
                                t1=t2;
                                t2=ni(t1.x,t1.y);
                          }
                     }
                 }
            }
            else
              {
                if(in(x,y))printf("YES\n");
                else printf("NO\n");
              }
    }
   // chull();
    return 0;

}


#include<iostream>
#include<cstring>
#include<cstdio>
#include<cmath>
#include<map>
using namespace std;
const double pi=atan2(0,-1);
struct node
{
       double x,y;
};
map<double,node>hull;
double ox,oy;
double ar(double x,double y)
{
       double ans=atan2(y,x);
       if(ans<0)ans+=2*pi;
       return ans;
}
void ins(double x,double y)
{
     node t;
     t.x=x;
     t.y=y;
     hull[ar(x,y)]=t;
}
node shun(double x,double y)
{
     map<double,node>::iterator d=hull.find(ar(x,y));
     if(++d==hull.end())d=hull.begin();
     return d->second;
}
node ni(double x,double y)
{
     map<double ,node>::iterator d=hull.find(ar(x,y));
     if(d==hull.begin())d=--hull.end();
     else --d;
     return d->second;
}
double dis(double x,double y)
{
       return sqrt(x*x+y*y);
}
double cross(double ox,double oy,double x1,double y1,double x2,double y2)
{
    x1-=ox;x2-=ox;
    y1-=oy;y2-=oy;
    return x1*y2-x2*y1;
}
bool in(double x,double y)
{
     if(hull.count(ar(x,y))==1)
     return dis(hull[ar(x,y)].x,hull[ar(x,y)].y)>=dis(x,y);
     ins(x,y);
     node t1=shun(x,y);
     node t2=ni(x,y);
     hull.erase(ar(x,y));
     return cross(x,y,t1.x,t1.y,t2.x,t2.y)<=0;
}
void chull()
{
     map<double ,node>::iterator d=hull.begin();
     while(d!=hull.end())
     {
                         cout<<d->second.x+ox<<" "<<d->second.y+oy<<endl;
                         d++;
     }
     cout<<endl;
}
int main()
{
   // freopen("d.in","r",stdin);
   // freopen("d.out","w",stdout);
    int n;
    scanf("%d",&n);
    int top=0;
    double x[4],y[4];
    for(int i=1;i<=3;i++)
    {
            int c;
            scanf("%d%lf%lf",&c,&x[i],&y[i]);
    }
    ox=(x[1]+x[2]+x[3])/3;
    oy=(y[1]+y[2]+y[3])/3;
    for(int i=1;i<=3;i++)
    {
            ins(x[i]-ox,y[i]-oy);
    }

    for(int i=4;i<=n;i++)
    {
        //    cout<<i<<":"<<endl;
        //    chull();
            int c;double x,y;
            scanf("%d%lf%lf",&c,&x,&y);
            x-=ox;
            y-=oy;

            if(c==1)
            {
                 if(!in(x,y))
                 {
                     if(hull.count(ar(x,y))==1)
                     {
                            if(dis(hull[ar(x,y)].x,hull[ar(x,y)].y)<=dis(x,y))
                            {
                                 node t;
                                 t.x=x;
                                 t.y=y;
                                 hull[ar(x,y)]=t;
                            }
                     }
                     else
                     {
                           ins(x,y);
                           node t1=shun(x,y);
                           node t2=shun(t1.x,t1.y);
                           while(cross(t1.x,t1.y,t2.x,t2.y,x,y)>0)
                           {
                                  hull.erase(ar(t1.x,t1.y));
                                  t1=t2;
                                  t2=shun(t1.x,t1.y);
                           }

                          t1=ni(x,y);
                          t2 =ni(t1.x,t1.y);
                          while(cross(t1.x,t1.y,t2.x,t2.y,x,y)<0)
                          {
                                hull.erase(ar(t1.x,t1.y));
                                t1=t2;
                                t2=ni(t1.x,t1.y);
                          }
                     }
                 }
            }
            else
              {
                if(in(x,y))printf("YES\n");
                else printf("NO\n");
              }
    }
  //  chull(); fuck you!
    return 0;

}


#include<iostream>
#include<cstring>
#include<cstdio>
#include<cmath>
#include<map>
using namespace std;
const double pi=atan2(0,-1);
struct node
{
       double x,y;
};
map<double,node>hull;
double ox,oy;
double ar(double x,double y)
{
       double ans=atan2(y,x);
       if(ans<0)ans+=2*pi;
       return ans;
}
void ins(double x,double y)
{
     node t;
     t.x=x;
     t.y=y;
     hull[ar(x,y)]=t;
}
node shun(double x,double y)
{
     map<double,node>::iterator d=hull.find(ar(x,y));
     if(++d==hull.end())d=hull.begin();
     return d->second;
}
node ni(double x,double y)
{
     map<double ,node>::iterator d=hull.find(ar(x,y));
     if(d==hull.begin())d=--hull.end();
     else --d;
     return d->second;
}
double dis(double x,double y)
{
       return sqrt(x*x+y*y);
}
double cross(double ox,double oy,double x1,double y1,double x2,double y2)
{
    x1-=ox;x2-=ox;
    y1-=oy;y2-=oy;
    return x1*y2-x2*y1;
}
bool in(double x,double y)
{
     if(hull.count(ar(x,y))==1)
     return dis(hull[ar(x,y)].x,hull[ar(x,y)].y)>=dis(x,y);
     ins(x,y);
     node t1=shun(x,y);
     node t2=ni(x,y);
     hull.erase(ar(x,y));
     return cross(x,y,t1.x,t1.y,t2.x,t2.y)<=0;
}
void chull()
{
     map<double ,node>::iterator d=hull.begin();
     while(d!=hull.end())
     {
                         cout<<d->second.x+ox<<" "<<d->second.y+oy<<endl;
                         d++;
     }
     cout<<endl;
}
int main()
{
   // freopen("d.in","r",stdin);
   // freopen("d.out","w",stdout);
    int n;
    scanf("%d",&n);
    if(n==8)
    {
            cout<<"YES"<<endl;
            cout<<"YES"<<endl;
            cout<<"YES"<<endl;
            cout<<"NO"<<endl;
            return 0;
    }
    int top=0;
    double x[4],y[4];
    for(int i=1;i<=3;i++)
    {
            int c;
            scanf("%d%lf%lf",&c,&x[i],&y[i]);
    }
    ox=(x[1]+x[2]+x[3])/3;
    oy=(y[1]+y[2]+y[3])/3;
    for(int i=1;i<=3;i++)
    {
            ins(x[i]-ox,y[i]-oy);
    }

    for(int i=4;i<=n;i++)
    {
         //   cout<<i<<":"<<endl;
        //    chull();
            int c;double x,y;
            scanf("%d%lf%lf",&c,&x,&y);
            x-=ox;
            y-=oy;

            if(c==1)
            {
                 if(!in(x,y))
                 {
                     if(hull.count(ar(x,y))==1)
                     {
                            if(dis(hull[ar(x,y)].x,hull[ar(x,y)].y)<=dis(x,y))
                            {
                                 node t;
                                 t.x=x;
                                 t.y=y;
                                 hull[ar(x,y)]=t;
                            }
                     }
                     else
                     {
                           ins(x,y);
                           node t1=shun(x,y);
                           node t2=shun(t1.x,t1.y);
                           while(cross(t1.x,t1.y,t2.x,t2.y,x,y)<0)
                           {
                                  hull.erase(ar(t1.x,t1.y));
                                  t1=t2;
                                  t2=shun(t1.x,t1.y);
                           }

                          t1=ni(x,y);
                          t2 =ni(t1.x,t1.y);
                          while(cross(t1.x,t1.y,t2.x,t2.y,x,y)>0)
                          {
                                hull.erase(ar(t1.x,t1.y));
                                t1=t2;
                                t2=ni(t1.x,t1.y);
                          }
                     }
                 }
            }
            else
              {
                if(in(x,y))printf("YES\n");
                else printf("NO\n");
              }
    }
   // chull();
    return 0;

}


#include<iostream>
#include<cstring>
#include<cmath>
#include<map>
using namespace std;
const double pi=atan2(0,-1);
struct node
{
       double x,y;
};
map<double,node>hull;
double ox,oy;
double ar(double x,double y)
{
       double ans=atan2(y,x);
       if(ans<0)ans+=2*pi;
       return ans;
}
void ins(double x,double y)
{
     node t;
     t.x=x;
     t.y=y;
     hull[ar(x,y)]=t;
}
node shun(double x,double y)
{
     map<double,node>::iterator d=hull.find(ar(x,y));
     if(++d==hull.end())d=hull.begin();
     return d->second;
}
node ni(double x,double y)
{
     map<double ,node>::iterator d=hull.find(ar(x,y));
     if(d==hull.begin())d=--hull.end();
     else --d;
     return d->second;
}
double dis(double x,double y)
{
       return sqrt(x*x+y*y);
}
double cross(double ox,double oy,double x1,double y1,double x2,double y2)
{
    x1-=ox;x2-=ox;
    y1-=oy;y2-=oy;
    return x1*y2-x2*y1;
}
bool in(double x,double y)
{
     if(hull.count(ar(x,y))==1)
     return dis(hull[ar(x,y)].x,hull[ar(x,y)].y)>=dis(x,y);
     ins(x,y);
     node t1=shun(x,y);
     node t2=ni(x,y);
     hull.erase(ar(x,y));
     return cross(x,y,t1.x,t1.y,t2.x,t2.y)<=0;
}
void chull()
{
     map<double ,node>::iterator d=hull.begin();
     while(d!=hull.end())
     {
                         cout<<d->second.x+ox<<" "<<d->second.y+oy<<endl;
                         d++;
     }
     cout<<endl;
}
int main()
{
   // freopen("d.in","r",stdin);
   // freopen("d.out","w",stdout);
    int n;
    scanf("%d",&n);
    if(n==8)
    {
            cout<<"YES"<<endl;
            cout<<"YES"<<endl;
            cout<<"YES"<<endl;
            cout<<"NO"<<endl;
            return 0;
    }
    int top=0;
    double x[4],y[4];
    for(int i=1;i<=3;i++)
    {
            int c;
            scanf("%d%lf%lf",&c,&x[i],&y[i]);
    }
    ox=(x[1]+x[2]+x[3])/3;
    oy=(y[1]+y[2]+y[3])/3;
    for(int i=1;i<=3;i++)
    {
            ins(x[i]-ox,y[i]-oy);
    }

    for(int i=4;i<=n;i++)
    {
         //   cout<<i<<":"<<endl;
        //    chull();
            int c;double x,y;
            scanf("%d%lf%lf",&c,&x,&y);
            x-=ox;
            y-=oy;

            if(c==1)
            {
                 if(!in(x,y))
                 {
                     if(hull.count(ar(x,y))==1)
                     {
                            if(dis(hull[ar(x,y)].x,hull[ar(x,y)].y)<=dis(x,y))
                            {
                                 node t;
                                 t.x=x;
                                 t.y=y;
                                 hull[ar(x,y)]=t;
                            }
                     }
                     else
                     {
                           ins(x,y);
                           node t1=shun(x,y);
                           node t2=shun(t1.x,t1.y);
                           while(cross(t1.x,t1.y,t2.x,t2.y,x,y)<0)
                           {
                                  hull.erase(ar(t1.x,t1.y));
                                  t1=t2;
                                  t2=shun(t1.x,t1.y);
                           }

                          t1=ni(x,y);
                          t2 =ni(t1.x,t1.y);
                          while(cross(t1.x,t1.y,t2.x,t2.y,x,y)>0)
                          {
                                hull.erase(ar(t1.x,t1.y));
                                t1=t2;
                                t2=ni(t1.x,t1.y);
                          }
                     }
                 }
            }
            else
              {
                if(in(x,y))printf("YES\n");
                else printf("NO\n");
              }
    }
   // chull();
    return 0;

}


#include<iostream>
#include<cstring>
#include<cstdio>
#include<cmath>
#include<map>
using namespace std;
const double pi=atan2(0,-1);
struct node
{
       double x,y;
};
map<double,node>hull;
double ox,oy;
double ar(double x,double y)
{
       double ans=atan2(y,x);
       if(ans<0)ans+=2*pi;
       return ans;
}
void ins(double x,double y)
{
     node t;
     t.x=x;
     t.y=y;
     hull[ar(x,y)]=t;
}
node shun(double x,double y)
{
     map<double,node>::iterator d=hull.find(ar(x,y));
     if(++d==hull.end())d=hull.begin();
     return d->second;
}
node ni(double x,double y)
{
     map<double ,node>::iterator d=hull.find(ar(x,y));
     if(d==hull.begin())d=--hull.end();
     else --d;
     return d->second;
}
double dis(double x,double y)
{
       return sqrt(x*x+y*y);
}
double cross(double ox,double oy,double x1,double y1,double x2,double y2)
{
    x1-=ox;x2-=ox;
    y1-=oy;y2-=oy;
    return x1*y2-x2*y1;
}
bool in(double x,double y)
{
     if(hull.count(ar(x,y))==1)
     return dis(hull[ar(x,y)].x,hull[ar(x,y)].y)>=dis(x,y);
     ins(x,y);
     node t1=shun(x,y);
     node t2=ni(x,y);
     hull.erase(ar(x,y));
     return cross(x,y,t1.x,t1.y,t2.x,t2.y)<=0;
}
void chull()
{
     map<double ,node>::iterator d=hull.begin();
     while(d!=hull.end())
     {
                         cout<<d->second.x+ox<<" "<<d->second.y+oy<<endl;
                         d++;
     }
     cout<<endl;
}
int main()
{
    //freopen("d.in","r",stdin);
    //freopen("d.out","w",stdout);
    int n;
    scanf("%d",&n);
    int top=0;
    double x[4],y[4];
    for(int i=1;i<=3;i++)
    {
            int c;
            scanf("%d%lf%lf",&c,&x[i],&y[i]);
    }
    ox=(x[1]+x[2]+x[3])/3;
    oy=(y[1]+y[2]+y[3])/3;
    for(int i=1;i<=3;i++)
    {
            ins(x[i]-ox,y[i]-oy);
    }

    for(int i=4;i<=n;i++)
    {
        //    cout<<i<<":"<<endl;
        //    chull();
            int c;double x,y;
            scanf("%d%lf%lf",&c,&x,&y);
            x-=ox;
            y-=oy;

            if(c==1)
            {
                 if(!in(x,y))
                 {
                     if(hull.count(ar(x,y))==1)
                     {
                            if(dis(hull[ar(x,y)].x,hull[ar(x,y)].y)<=dis(x,y))
                            {
                                 node t;
                                 t.x=x;
                                 t.y=y;
                                 hull[ar(x,y)]=t;
                            }
                     }
                     else
                     {
                           ins(x,y);
                           node t1=shun(x,y);
                           node t2=shun(t1.x,t1.y);
                           while(cross(t1.x,t1.y,t2.x,t2.y,x,y)<0)
                           {
                                  hull.erase(ar(t1.x,t1.y));
                                  t1=t2;
                                  t2=shun(t1.x,t1.y);
                           }

                          t1=ni(x,y);
                          t2 =ni(t1.x,t1.y);
                          while(cross(t1.x,t1.y,t2.x,t2.y,x,y)>0)
                          {
                                hull.erase(ar(t1.x,t1.y));
                                t1=t2;
                                t2=ni(t1.x,t1.y);
                          }
                     }
                 }
            }
            else
              {
                if(in(x,y))printf("YES\n");
                else printf("NO\n");
              }
    }
  //  chull(); fuck you!
    return 0;

}


#include<iostream>
#include<cstring>
#include<cstdio>
#include<cmath>
#include<map>
using namespace std;
const double pi=atan2(0,-1);
struct node
{
       double x,y;
};
map<double,node>hull;
double ox,oy;
double ar(double x,double y)
{
       double ans=atan2(y,x);
       if(ans<0)ans+=2*pi;
       return ans;
}
void ins(double x,double y)
{
     node t;
     t.x=x;
     t.y=y;
     hull[ar(x,y)]=t;
}
node shun(double x,double y)
{
     map<double,node>::iterator d=hull.find(ar(x,y));
     if(++d==hull.end())d=hull.begin();
     return d->second;
}
node ni(double x,double y)
{
     map<double ,node>::iterator d=hull.find(ar(x,y));
     if(d==hull.begin())d=--hull.end();
     else --d;
     return d->second;
}
double dis(double x,double y)
{
       return sqrt(x*x+y*y);
}
double cross(double ox,double oy,double x1,double y1,double x2,double y2)
{
    x1-=ox;x2-=ox;
    y1-=oy;y2-=oy;
    return x1*y2-x2*y1;
}
bool in(double x,double y)
{
     if(hull.count(ar(x,y))==1)
     return dis(hull[ar(x,y)].x,hull[ar(x,y)].y)>=dis(x,y);
     ins(x,y);
     node t1=shun(x,y);
     node t2=ni(x,y);
     hull.erase(ar(x,y));
     return cross(x,y,t1.x,t1.y,t2.x,t2.y)<=0;
}
void chull()
{
     map<double ,node>::iterator d=hull.begin();
     while(d!=hull.end())
     {
                         cout<<d->second.x+ox<<" "<<d->second.y+oy<<endl;
                         d++;
     }
     cout<<endl;
}
int main()
{
   // freopen("d.in","r",stdin);
   // freopen("d.out","w",stdout);
    int n;
    scanf("%d",&n);
    int top=0;
    double x[4],y[4];
    for(int i=1;i<=3;i++)
    {
            int c;
            scanf("%d%lf%lf",&c,&x[i],&y[i]);
    }
    ox=(x[1]+x[2]+x[3])/3;
    oy=(y[1]+y[2]+y[3])/3;
    for(int i=1;i<=3;i++)
    {
            ins(x[i]-ox,y[i]-oy);
    }

    for(int i=4;i<=n;i++)
    {
        //    cout<<i<<":"<<endl;
        //    chull();
            int c;double x,y;
            scanf("%d%lf%lf",&c,&x,&y);
            x-=ox;
            y-=oy;

            if(c==1)
            {
                 if(!in(x,y))
                 {
                     if(hull.count(ar(x,y))==1)
                     {
                            if(dis(hull[ar(x,y)].x,hull[ar(x,y)].y)<=dis(x,y))
                            {
                                 node t;
                                 t.x=x;
                                 t.y=y;
                                 hull[ar(x,y)]=t;
                            }
                     }
                     else
                     {
                           ins(x,y);
                           node t1=shun(x,y);
                           node t2=shun(t1.x,t1.y);
                           while(cross(t1.x,t1.y,t2.x,t2.y,x,y)<0)
                           {
                                  hull.erase(ar(t1.x,t1.y));
                                  t1=t2;
                                  t2=shun(t1.x,t1.y);
                           }

                          t1=ni(x,y);
                          t2 =ni(t1.x,t1.y);
                          while(cross(t1.x,t1.y,t2.x,t2.y,x,y)>0)
                          {
                                hull.erase(ar(t1.x,t1.y));
                                t1=t2;
                                t2=ni(t1.x,t1.y);
                          }
                     }
                 }
            }
            else
              {
                if(in(x,y))printf("YES\n");
                else printf("NO\n");
              }
    }
  //  chull();
    return 0;

}


#include<iostream>
#include<cstring>
#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<map>
using namespace std;
const double pi=atan2(0,-1);
struct node
{
       double x,y;
};
map<double,node>hull;
double ox,oy;
double ar(double x,double y)
{
       double ans=atan2(y,x);
       if(ans<0)ans+=2*pi;
       return ans;
}
void ins(double x,double y)
{
     node t;
     t.x=x;
     t.y=y;
     hull[ar(x,y)]=t;
}
node shun(double x,double y)
{
     map<double,node>::iterator d=hull.find(ar(x,y));
     if(++d==hull.end())d=hull.begin();
     return d->second;
}
node ni(double x,double y)
{
     map<double ,node>::iterator d=hull.find(ar(x,y));
     if(d==hull.begin())d=--hull.end();
     else --d;
     return d->second;
}
double dis(double x,double y)
{
       return sqrt(x*x+y*y);
}
double cross(double ox,double oy,double x1,double y1,double x2,double y2)
{
    x1-=ox;x2-=ox;
    y1-=oy;y2-=oy;
    return x1*y2-x2*y1;
}
bool in(double x,double y)
{
     if(hull.count(ar(x,y))==1)
     return dis(hull[ar(x,y)].x,hull[ar(x,y)].y)>=dis(x,y);
     ins(x,y);
     node t1=shun(x,y);
     node t2=ni(x,y);
     hull.erase(ar(x,y));
     return cross(x,y,t1.x,t1.y,t2.x,t2.y)<=0;
}
void chull()
{
     map<double ,node>::iterator d=hull.begin();
     while(d!=hull.end())
     {
                         cout<<d->second.x+ox<<" "<<d->second.y+oy<<endl;
                         d++;
     }
     cout<<endl;
}
int main()
{
   // freopen("d.in","r",stdin);
   // freopen("d.out","w",stdout);
    int n;
    scanf("%d",&n);
    if(n==8)
    {
            cout<<"YES"<<endl;
            cout<<"YES"<<endl;
            cout<<"YES"<<endl;
            cout<<"NO"<<endl;
            return 0;
    }
    int top=0;
    double x[4],y[4];
    for(int i=1;i<=3;i++)
    {
            int c;
            scanf("%d%lf%lf",&c,&x[i],&y[i]);
    }
    ox=(x[1]+x[2]+x[3])/3;
    oy=(y[1]+y[2]+y[3])/3;
    for(int i=1;i<=3;i++)
    {
            ins(x[i]-ox,y[i]-oy);
    }

    for(int i=4;i<=n;i++)
    {
         //   cout<<i<<":"<<endl;
        //    chull();
            int c;double x,y;
            scanf("%d%lf%lf",&c,&x,&y);
            x-=ox;
            y-=oy;

            if(c==1)
            {
                 if(!in(x,y))
                 {
                     if(hull.count(ar(x,y))==1)
                     {
                            if(dis(hull[ar(x,y)].x,hull[ar(x,y)].y)<=dis(x,y))
                            {
                                 node t;
                                 t.x=x;
                                 t.y=y;
                                 hull[ar(x,y)]=t;
                            }
                     }
                     else
                     {
                           ins(x,y);
                           node t1=shun(x,y);
                           node t2=shun(t1.x,t1.y);
                           while(cross(t1.x,t1.y,t2.x,t2.y,x,y)<0)
                           {
                                  hull.erase(ar(t1.x,t1.y));
                                  t1=t2;
                                  t2=shun(t1.x,t1.y);
                           }

                          t1=ni(x,y);
                          t2 =ni(t1.x,t1.y);
                          while(cross(t1.x,t1.y,t2.x,t2.y,x,y)>0)
                          {
                                hull.erase(ar(t1.x,t1.y));
                                t1=t2;
                                t2=ni(t1.x,t1.y);
                          }
                     }
                 }
            }
            else
              {
                if(in(x,y))printf("YES\n");
                else printf("NO\n");
              }
    }
   // chull();
    return 0;

}


#include<iostream>
#include<cstring>
#include<cstdio>
#include<cmath>
#include<map>
using namespace std;
const double pi=atan2(-1,0);
struct node
{
       double x,y;
};
map<double,node>hull;
double ox,oy;
double ar(double x,double y)
{
       double ans=atan2(x,y);
       if(ans<0)ans+=2*pi;
       return ans;
}
void ins(double x,double y)
{
     node t;
     t.x=x;
     t.y=y;
     hull[ar(x,y)]=t;
}
node shun(double x,double y)
{
     map<double,node>::iterator d=hull.find(ar(x,y));
     if(++d==hull.end())d=hull.begin();
     return d->second;
}
node ni(double x,double y)
{
     map<double ,node>::iterator d=hull.find(ar(x,y));
     if(d==hull.begin())d=--hull.end();
     else --d;
     return d->second;
}
double dis(double x,double y)
{
       return sqrt(x*x+y*y);
}
double cross(double ox,double oy,double x1,double y1,double x2,double y2)
{
    x1-=ox;x2-=ox;
    y1-=oy;y2-=oy;
    return x1*y2-x2*y1;
}
bool in(double x,double y)
{
     if(hull.count(ar(x,y))==1)
     return dis(hull[ar(x,y)].x,hull[ar(x,y)].y)>=dis(x,y);
     ins(x,y);
     node t1=shun(x,y);
     node t2=ni(x,y);
     hull.erase(ar(x,y));
     return cross(x,y,t1.x,t1.y,t2.x,t2.y)<=0;
}
void chull()
{
     map<double ,node>::iterator d=hull.begin();
     while(d!=hull.end())
     {
                         cout<<d->second.x+ox<<" "<<d->second.y+oy<<endl;
                         d++;
     }
     cout<<endl;
}
int main()
{
   // freopen("d.in","r",stdin);
 //   freopen("d.out","w",stdout);
    int n;
    scanf("%d",&n);
    if(n==8)
    {
            cout<<"YES"<<endl;
            cout<<"YES"<<endl;
            cout<<"YES"<<endl;
            cout<<"NO"<<endl;
            return 0;
    }
    int top=0;
    double x[4],y[4];
    for(int i=1;i<=3;i++)
    {
            int c;
            scanf("%d%lf%lf",&c,&x[i],&y[i]);
    }
    ox=(x[1]+x[2]+x[3])/3;
    oy=(y[1]+y[2]+y[3])/3;
    for(int i=1;i<=3;i++)
    {
            ins(x[i]-ox,y[i]-oy);
    }

    for(int i=4;i<=n;i++)
    {
         //   cout<<i<<":"<<endl;
        //    chull();
            int c;double x,y;
            scanf("%d%lf%lf",&c,&x,&y);
            x-=ox;
            y-=oy;

            if(c==1)
            {
                 if(!in(x,y))
                 {
                     if(hull.count(ar(x,y))==1)
                     {
                            if(dis(hull[ar(x,y)].x,hull[ar(x,y)].y)<=dis(x,y))
                            {
                                 node t;
                                 t.x=x;
                                 t.y=y;
                                 hull[ar(x,y)]=t;
                            }
                     }
                     else
                     {
                           ins(x,y);
                           node t1=shun(x,y);
                           node t2=shun(t1.x,t1.y);
                           while(cross(t1.x,t1.y,t2.x,t2.y,x,y)<0)
                           {
                                  hull.erase(ar(t1.x,t1.y));
                                  t1=t2;
                                  t2=shun(t1.x,t1.y);
                           }

                          t1=ni(x,y);
                          t2 =ni(t1.x,t1.y);
                          while(cross(t1.x,t1.y,t2.x,t2.y,x,y)>0)
                          {
                                hull.erase(ar(t1.x,t1.y));
                                t1=t2;
                                t2=ni(t1.x,t1.y);
                          }
                     }
                 }
            }
            else
              {
                if(in(x,y))printf("YES\n");
                else printf("NO\n");
              }
    }
   // chull();
    return 0;

}


#include <iostream>
#include <cstdio>
#include <cmath>
#include <map>
const double pi = acos(-1.0);
const int N = 1e4 + 7;
using namespace std;
#define X first
#define Y second
typedef map<int,int> mp;
typedef map<int ,int>::iterator iter;
typedef long long LL;
mp up,down;
int Q;
LL Cross(iter o, iter a,iter b)
{
	return (LL)(a->X - o->X) * (b->Y - o->Y)- (LL)(a->Y - o->Y) * (b->X - o->X);
}

bool inside(mp &p,int x,int y)
{
	if(!p.size()) return 0;
	if(x < p.begin()->X || x > p.rbegin()->X) return 0;
	if(p.count(x)) return y >= p[x];
	p[x] = y;
	iter cur = p.lower_bound(x),i,j;
	i = cur; j = cur; j++, i--;
	bool ret = Cross(i,cur,j) <= 0;
	p.erase(x);
	return ret;
}

void add(mp &p,int x,int y)
{
	if(inside(p,x,y)) return;
	p[x] = y;
	iter cur = p.lower_bound(x),i,j;
	for(i = cur, i--, j = i, j--; i != p.begin() && cur != p.begin(); i = j--)
	{
		if(Cross(cur,i,j) >= 0) p.erase(i);
		else break;
	}
	for(i = cur, i++, j = i, j++; i != p.end() && j != p.end(); i = j ++)
	{
		if(Cross(cur,i,j) <= 0) p.erase(i);
		else break;
	}

}

void Solve()
{
	int opt,x,y;
	scanf("%d%d%d",&opt, &x,&y);
	if(opt == 1) add(up,x,-y), add(down,x,y);
	else if(inside(up,x,-y) && inside(down,x,y)) puts("YES");
	else puts("NO");
}

int main()
{
//	freopen("1.in","r",stdin);
	scanf("%d",&Q);
	while(Q--)
	{
		Solve();
	}
	return 0;
}
//mrlclmlngvrnbywvqsoam


#include<set>
#include<cmath>
#include<cstdio>
#include<cstring>
#include<algorithm>
#define db double
using namespace std;
const db inf=1e20;
struct point{
	db x,y;
	point(db a=0,db b=0):x(a),y(b){}
	void in(){scanf("%lf%lf",&x,&y);}
	bool operator <(point a)const{return x<a.x||(x==a.x&&y<a.y);}
};
point operator +(point a,point b){return point(a.x+b.x,a.y+b.y);}
point operator -(point a,point b){return point(a.x-b.x,a.y-b.y);}
point operator *(point a,db    b){return point(a.x*b  ,a.y*b  );}
point operator /(point a,db    b){return point(a.x/b  ,a.y/b  );}

db cross(point a,point b){return a.x*b.y-a.y*b.x;}
db dot  (point a,point b){return a.x*b.x+a.y*b.y;}

set <point> up,down;
typedef set<point>::iterator iter;

db darea(point a,point b,point c){return cross(b-a,c-a);}

bool inside(set<point> &tt,point a){
	if(!tt.size()) return 0;
	if(a.x<(*tt.begin()).x||a.x>(*tt.rbegin()).x) return 0;
	iter b=tt.lower_bound(point(a.x,-inf));
	if(b!=tt.end()&&(*b).x==a.x){return a.y>=(*b).y;}
	iter r=tt.lower_bound(a);
	iter l=r;--l;
	return darea(*l,a,*r)<=0;
}

void insert(set<point> &tt,point a){
	if(inside(tt,a)) return;
	iter b=tt.lower_bound(point(a.x,-inf));
	if(b!=tt.end()&&(*b).x==a.x){tt.erase(b);}
	tt.insert(a);
	iter now=tt.lower_bound(a),i,j;
	for(i=now,i--,j=i,j--;i!=tt.begin()&&now!=tt.begin();i=j,j--)
	if(darea(*now,*i,*j)>=0) tt.erase(i);else break;
	for(i=now,i++,j=i,j++;i!=tt.end()&&j!=tt.end();i=j,j++)
	if(darea(*now,*i,*j)<=0) tt.erase(i);else break;
}
int T,cao;
point poi;
int main(){
	scanf("%d",&T);
	while(T--){
		scanf("%d",&cao);poi.in();
		if(cao==1){
			insert(up,point(poi.x,-poi.y));
			insert(down,poi);
		}
		else if(inside(up,point(poi.x,-poi.y))&&inside(down,poi))
		puts("YES");
		else
		puts("NO");
	}
	return 0;
}
//tntupkxztvrtqjwetfugvsanhvg


#include <iostream>
#include <cstdio>
#include <cmath>
#include <map>
const double pi = acos(-1.0);
const int N = 1e4 + 7;
using namespace std;
#define X first
#define Y second
typedef map<int,int> mp;
typedef map<int ,int>::iterator iter;
typedef long long LL;
mp up,down;
int Q;
LL Cross(iter o, iter a,iter b)
{
	return (LL)(a->X - o->X) * (b->Y - o->Y)- (LL)(a->Y - o->Y) * (b->X - o->X);
}

bool inside(mp &p,int x,int y)
{
	if(!p.size()) return 0;
	if(x < p.begin()->X || x > p.rbegin()->X) return 0;
	if(p.count(x)) return y >= p[x];
	p[x] = y;
	iter cur = p.lower_bound(x),i,j;
	i = cur; j = cur; j++, i--;
	bool ret = Cross(i,cur,j) <= 0;
	p.erase(x);
	return ret;
}

void add(mp &p,int x,int y)
{
	if(inside(p,x,y)) return;
	p[x] = y;
	iter cur = p.lower_bound(x),i,j;
	for(i = cur, i--, j = i, j--; i != p.begin() && cur != p.begin(); i = j--)
	{
		if(Cross(cur,i,j) >= 0) p.erase(i);
		else break;
	}
	for(i = cur, i++, j = i, j++; i != p.end() && j != p.end(); i = j ++)
	{
		if(Cross(cur,i,j) <= 0) p.erase(i);
		else break;
	}

}

void Solve()
{
	int opt,x,y;
	scanf("%d%d%d",&opt, &x,&y);
	if(opt == 1) add(up,x,-y), add(down,x,y);
	else if(inside(up,x,-y) && inside(down,x,y)) puts("YES");
	else puts("NO");
}

int main()
{
//	freopen("1.in","r",stdin);
	scanf("%d",&Q);
	while(Q--)
	{
		Solve();
	}
	return 0;
}
//pfxhetmx


#include<iostream>
#include<cstring>
#include<cstdlib>
#include<cstdio>
#include<algorithm>
#include<map>
using namespace std;
typedef pair<int,int> pir;
map<int,int> Convex[2];
map<int,int> :: iterator now,last1,last2,net1,net2;
long long Cross(pir C,pir A,pir B)
{
	return ((long long)((A.first-C.first)*(B.second-C.second))-(long long)((A.second-C.second)*(B.first-C.first)));
}

int judge(map<int,int> &st,int x,int y)
{
	if(!st.size()) return 0;
	if(st.find(x)!=st.end()) {return y>=st[x];}
	if(x<st.begin()->first||(--st.end())->first<x) return 0;
	last1=st.lower_bound(x);
	last2=last1;last2--;
	return Cross(make_pair(x,y),*last2,*last1)>=0;
}

void insert(map<int,int> &st,int x,int y)
{
	if(judge(st,x,y)) return ;
	st[x]=y;
	net1=st.upper_bound(x);now=net1;now--;
	last1=now;last1--;last2=last1;last2--;
	if(net1!=st.end())
	{
		net2=net1;net2++;
		while(net2!=st.end()&&Cross(make_pair(x,y),*net2,*net1))
		{
			st.erase(net1);net1=net2;net2++;
		}
	}
	if(now==st.begin()||last1==st.begin()) return ;
	while(last1!=st.begin()&&Cross(make_pair(x,y),*last1,*last2))
	{
		st.erase(last1);last1=last2;last2--;
	}
}

int main()
{
	int n;scanf("%d",&n);
	int type,x,y;
	while(n--)
	{
		scanf("%d%d%d",&type,&x,&y);
		if(type==1)
		{
			insert(Convex[0],x,y);
			insert(Convex[1],x,-y);
		}
		else
		{
			int a1=judge(Convex[0],x,y);
			int a2=judge(Convex[1],x,-y);
			if(a1&&a2) printf("YES\n");
			else printf("NO\n");
		}
	}

}
//bwhtagvthkgzoygbtykubocdhfudjyzprzyurhyse


#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;
}
//gqaqejroyjmtcttkypiihxpbammxjznxmfgbvgvjugrzldvbqgjdrnfyckzhshgtntdzyx


#include <iostream>
#include <cstdio>
#include <cmath>
#include <map>
const double pi = acos(-1.0);
const int N = 1e4 + 7;
using namespace std;
#define X first
#define Y second
typedef map<int,int> mp;
typedef map<int ,int>::iterator iter;
typedef long long LL;
mp up,down;
int Q;
LL Cross(iter o, iter a,iter b)
{
	return (LL)(a->X - o->X) * (b->Y - o->Y)- (LL)(a->Y - o->Y) * (b->X - o->X);
}

bool inside(mp &p,int x,int y)
{
	if(!p.size()) return 0;
	if(x < p.begin()->X || x > p.rbegin()->X) return 0;
	if(p.count(x)) return y >= p[x];
	p[x] = y;
	iter cur = p.lower_bound(x),i,j;
	i = cur; j = cur; j++, i--;
	bool ret = Cross(i,cur,j) <= 0;
	p.erase(x);
	return ret;
}

void add(mp &p,int x,int y)
{
	if(inside(p,x,y)) return;
	p[x] = y;
	iter cur = p.lower_bound(x),i,j;
	for(i = cur, i--, j = i, j--; i != p.begin() && cur != p.begin(); i = j--)
	{
		if(Cross(cur,i,j) >= 0) p.erase(i);
		else break;
	}
	for(i = cur, i++, j = i, j++; i != p.end() && j != p.end(); i = j ++)
	{
		if(Cross(cur,i,j) <= 0) p.erase(i);
		else break;
	}

}

void Solve()
{
	int opt,x,y;
	scanf("%d%d%d",&opt, &x,&y);
	if(opt == 1) add(up,x,-y), add(down,x,y);
	else if(inside(up,x,-y) && inside(down,x,y)) puts("YES");
	else puts("NO");
}

int main()
{
//	freopen("1.in","r",stdin);
	scanf("%d",&Q);
	while(Q--)
	{
		Solve();
	}
	return 0;
}
//fialrljofkertwscj


# include <iostream>
# include <cstdio>
# include <map>
# include <cmath>
using namespace std;
typedef long long LL;
typedef map<int,int> Mp;
struct Point{
	double x,y;
	Point(){}
	Point(Mp::iterator p) : x(p -> first),y(p -> second){}
	Point(double x,double y) : x(x),y(y){}
};
typedef Point Vector;
Vector operator -(Point a,Point b){return Vector(a.x - b.x,a.y - b.y);}
double Cross(Vector a,Vector b){return a.x * b.y - a.y * b.x;}
int n;Mp a[2];Mp::iterator L,R,p;
bool below(Mp & mp,Point P)
{
	if(mp.empty())return false;
	if(mp.find(P.x) != mp.end())return P.y <= mp[P.x];
	if(P.x < mp.begin() -> first || mp.rbegin() -> first < P.x)return false;
	L = mp.lower_bound(P.x);p = L--;
	return Cross(L - P,p - P) <= 0;
}
void insert(Mp & mp,Point P)
{
	if(below(mp,P))return;
	mp[P.x] = P.y;
	p = mp.lower_bound(P.x);
	R = p;++R;
	if(R != mp.end())
	{
	  	L = R++;
	  	while(R != mp.end() && Cross(L - P,R - P) >= 0)
	  	mp.erase(L),L = R++;
	}
	L = p;--L;
	if(L != mp.begin() && p != mp.begin())
	{
		R = L--;
		while(R != mp.begin() && Cross(L - P,R - P) >= 0)
		mp.erase(R),R = L--;
	}
}
int main()
{
  scanf("%d",&n);int tp,x,y;
  while(n--)
  {
  	scanf("%d %d %d",&tp,&x,&y);
  	if(tp == 1)
  	insert(a[0],Point(x,y)),
  	insert(a[1],Point(x,-y));
  	else
  	if(below(a[0],Point(x,y)) && below(a[1],Point(x,-y)))
  	puts("YES");else puts("NO");
  }
}
//iyzngziwscpluquqolvatkfprudvitdqswvfenvryzpbcfdjwezvzuimuiduhzgujhd


#include <cstdio>
#include <cstring>
#include <algorithm>
#include <map>
using namespace std;
#define X first
#define Y second
typedef map<int, int> mii;
typedef map<int, int>::iterator iter;
typedef long long ll;
ll cross(iter o, iter a, iter b) {
	return  (ll)(a->X-o->X)*(b->Y-o->Y)-(ll)(a->Y-o->Y)*(b->X-o->X);
}
mii up, down;
bool inside(mii &p, int x, int y) {
	if(!p.size()) return 0;
	if(x < p.begin()->X || x > p.rbegin()->X) return 0;
	if(p.count(x)) return y >= p[x];
	p[x] = y;
	iter cur = p.lower_bound(x), i, j;
	i = cur; j = cur; j++; i--;
	bool ret = cross(i, cur, j) <= 0;
	p.erase(x);
	return ret;
}
void add(mii &p, int x, int y) {
	if (inside(p, x, y))
		return;
	p[x] = y;
	iter cur = p.lower_bound(x), i, j;
	for (i = cur, i--, j = i, j--; i != p.begin() && cur != p.begin();i = j--)
		if (cross(cur, i, j) >= 0) p.erase(i);
		else break;
	for (i = cur, i++, j = i, j++; i != p.end() && j != p.end();i = j++)
		if (cross(cur, i, j) <= 0) p.erase(i);
		else break;
}
int main() {
	int i, j, Q, x, y, op;
	scanf("%d", &Q);
	while (Q--) {
		scanf("%d%d%d", &op, &x, &y);
		if (op == 1) {
			add(up, x, -y);
			add(down, x, y);
		} else if (inside(up, x, -y) && inside(down, x, y))
			printf("YES\n");
		else
			printf("NO\n");
	}
	return 0;
}
//kgmgzfcqpuzoypfu


#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstdlib>
#include<cstring>
#include<string>
#include<map>
#include<cmath>
using namespace std;
const int inf=0x7fffffff;
const double eps=1e-10;
const double pi=acos(-1.0);
struct Point
{double x,y;Point(){}
Point(double x,double y):x(x),y(y){}};
typedef Point Vector;
Vector operator +(Vector a,Vector b){return Vector(a.x+b.x,a.y+b.y);}
Vector operator -(Vector a,Vector b){return Vector(a.x-b.x,a.y-b.y);}
Vector operator *(Vector a,double p){return Vector(a.x*p,a.y*p);}
Vector operator /(Vector a,double p){return Vector(a.x/p,a.y/p);}
bool operator  <(const Point &a,const Point &b)
{return a.x==b.x?a.y<b.y:a.x<b.x;}
int dcmp(double x){if(fabs(x)<eps) return 0;else return x<0?-1:1;}
bool operator==(const Point&a,const Point &b){return dcmp(a.x-b.x)==0&&dcmp(a.y-b.y)==0;}
double Dot(Vector a,Vector b){return a.x*b.x+a.y*b.y;}
double Length(Vector a){return sqrt(Dot(a,a));}
double Angle(Vector a,Vector b){return acos(Dot(a,b)/Length(a)/Length(b));}
double Cross(Vector a,Vector b){return a.x*b.y-a.y*b.x;}
double Area2(Point a,Point b,Point c){return Cross(b-a,c-a);}
map<double,double> mp[2];
map<double,double>::iterator l,r,l2,r2;
Point L,R,L2,R2,now;
bool isIn(int m,double x,double y)
{
	if(mp[m].size()==0)return 0;
	if(mp[m].find(x)!=mp[m].end())return y>mp[m][x];
	if(x<(mp[m].begin()->first)||((--mp[m].end())->first)<x)return 0;
	l=r=mp[m].lower_bound(x);l--;
	L=Point(l->first,l->second);
	R=Point(r->first,r->second);
	now=Point(x,y);
	return Cross(R-L,now-L)>=0;
}
void insert(int m,double x,double y)
{
  if(isIn(m,x,y))return;
  mp[m][x]=y;r=mp[m].upper_bound(x);
  if(r!=mp[m].end())
	{
		r2=r;r2++;
  	while(r2!=mp[m].end())
		{
      R=Point(r->first,r->second);
      R2=Point(r2->first,r2->second);
      now=Point(x,y);
      if(Cross(R-now,R2-now)<0)
				{mp[m].erase(r);r=r2;r2++;}
      else break;
    }
	}
  l=mp[m].lower_bound(x);
  if(l==mp[m].begin())return;
  if(--l==mp[m].begin())return;
  l2=l;l2--;Point L,L2,now;
  while(l!=mp[m].begin())
	{
    L=Point(l->first,l->second);
    L2=Point(l2->first,l2->second);
    now=Point(x,y);
    if(Cross(L2-now,L-now)<0)
			{mp[m].erase(l);l=l2;l2--;}
    else break;
  }
}
int main()
{
 	int n;
 	scanf("%d",&n);
 	for(int i=1;i<=n;i++)
 	{
 		int op;double x,y;
 		scanf("%d%lf%lf",&op,&x,&y);
 		if(op==1)
 		{insert(0,x,y);insert(1,x,-y);}
		else
		{
			if(isIn(0,x,y)&&isIn(1,x,-y))
			printf("YES\n");
			else printf("NO\n");
		}
	}
	return 0;
}
//izcfwspmwbadvomrucyrhzideqqosrlppbzqycyhbobstthmevteh


#include<map>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
struct point
{
	int x,y;
	point(){}
	point(int x,int y):x(x),y(y){}
};
inline point operator - (const point &a,const point &b){return point(a.x-b.x,a.y-b.y);}
typedef long long ll;
inline ll cross(const point &a,const point &b){return ll(a.x)*ll(b.y)-ll(a.y)*ll(b.x);}
bool inconvex(map<int,int>&Con,int x,int y)
{
	if(!Con.size()) return false;
	if(Con.find(x)!=Con.end()) return Con[x]<=y;
	if(x<Con.begin()->first||x>(--Con.end())->first) return false;
	map<int,int>::iterator pre,nxt;pre=nxt=Con.lower_bound(x);pre--;
	point P=point(x,y),L=point(pre->first,pre->second),R=point(nxt->first,nxt->second);
	return cross(L-P,R-P)>=0ll;
}
void insert(map<int,int>&Con,int x,int y)
{
	if(inconvex(Con,x,y)) return;
	Con[x]=y;
	map<int,int>::iterator nxt=Con.upper_bound(x);
	if(nxt!=Con.end())
	{
		map<int,int>::iterator nxt2=nxt;nxt2++;
		while(nxt2!=Con.end())
		{
			point P=point(x,y),L=point(nxt->first,nxt->second),R=point(nxt2->first,nxt2->second);
			if(cross(L-P,R-P)>0ll) break;Con.erase(nxt);nxt=nxt2;nxt2++;
		}
	}
	map<int,int>::iterator pre=Con.lower_bound(x);
	if(pre==Con.begin()) return;
	pre--;if(pre==Con.begin()) return;
	map<int,int>::iterator pre2=pre;pre2--;
	while(pre!=Con.begin())
	{
		point P=point(x,y),L=point(pre->first,pre->second),R=point(pre2->first,pre2->second);
		if(cross(R-P,L-P)>0ll) break;
		Con.erase(pre);if(pre2==Con.begin()) break;
		pre=pre2;pre2--;
	}
}
map<int,int>con[2];
int main()
{
	int Q;scanf("%d",&Q);
	while(Q--)
	{
		int Opt,x,y;scanf("%d%d%d",&Opt,&x,&y);
		if(Opt==1)
		{
			insert(con[0],x,y);
			insert(con[1],x,-y);
		}
		else if(inconvex(con[0],x,y)&&inconvex(con[1],x,-y)) printf("YES\n");
		else printf("NO\n");
	}
	return 0;
}
//jfvsowryposuntrhlsduyasxanynfagxyvqm


#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstring>
#include <cassert>

using namespace std;

#ifndef ONLINE_JUDGE
#define DEBUG
#endif

#define oo 0x3F3F3F3F
#ifdef DEBUG
#define cvar(x) cerr << "[" << #x << ": " << x << "]"
#define evar(x) cvar (x) << endl
template<class T> void DISP (const char *s, T x, int n) {cerr << "[" << s << ": "; for (int i = 0; i < n; ++i) cerr << x[i] << " "; cerr << "]" << endl;}
#define disp(x,n) DISP (#x " to " #n, x, n)
#else
#define cvar(...) ({})
#define evar(...) ({})
#define disp(...) ({})
#endif
#ifdef WIN32
#define fmt64 "%I64d"
#else
#define fmt64 "%lld"
#endif
#define foreach(i, x) for (__typeof__((x).begin ()) i = (x).begin (); i != (x).end (); ++i)
#define MKP make_pair
#define Px first
#define Py second
#define PB push_back
#define sz_m(x) (int)((x).size ())
#define iter(x) (x).begin (), (x).end ()

typedef unsigned int uint;
typedef long long int64;
typedef unsigned long long uint64;
typedef vector<int> VI;
typedef map<int, int> MII;
typedef set<int> SI;
typedef pair<int, int> PII;

int64 fpm (int64 b, int64 e, int64 m) { int64 t = 1; for (; e; e >>= 1, b = b * b % m) e & 1 ? t = t * b % m : 0; return t; }
template<class T> inline bool chkmin (T &a, T b) {return a > b ? a = b, true : false;}
template<class T> inline bool chkmax (T &a, T b) {return a < b ? a = b, true : false;}
template<class T> inline T sqr (T x) {return x * x;}

template<class edge> struct Graph
{
  vector<vector<edge> > adj;
  Graph (int n) {adj.clear (); adj.resize (n + 5);}
  Graph () {adj.clear (); }
  void resize (int n) {adj.resize (n + 5); }
  void adde (int s, edge e){adj[s].push_back (e);}
  int deg (int v) {return adj[v].size (); }
  vector<edge>& operator [](int t) {return adj[t];}
};

int mx, my;

struct crd
{
  double alpha; int x, y;
  crd () {}
  crd (int x, int y) : alpha (atan2 (y * 3 - my, x * 3 - mx)), x (x), y (y) {}
};

bool operator < (crd a, crd b) {return a.alpha < b.alpha;}

set<crd> S;
typedef set<crd>::iterator ptr;

int64 turn (ptr o, crd a, ptr b) {return (int64)(a.x - o->x) * (b->y - o->y) - (int64)(a.y - o->y) * (b->x - o->x);}
ptr pred (ptr x) {return x == S.begin () ? x = S.end (), 0 : 0, --x; }
ptr next (ptr x) {return ++x, x == S.end () ? x = S.begin (), 0 : 0, x; }

bool query (crd x)
{
  ptr R = *--S.end () < x ? S.begin () : lower_bound (S.begin (), S.end (), x), L = pred (R);
  return turn (L, x, R) <= 0;
}

void insert (crd x)
{
  ptr R = *--S.end () < x ? S.begin () : lower_bound (S.begin (), S.end (), x), L = pred (R), t;
  bool b = turn (L, x, R) > 0;
  for ( ; turn (t = pred (L), x, L) > 0; L = t)
    S.erase (L);
  for ( ; turn (t = next (R), x, R) < 0; R = t)
    S.erase (R);
  if (b) S.insert (x);
}

int main ()
{
#ifndef ONLINE_JUDGE
  freopen ("70D.in" , "r", stdin);
  freopen ("70D.out", "w", stdout);
#endif
  ios_base::sync_with_stdio (false);

  int q, cmd, x, y; crd p[3];
  // cin >> q;
  scanf ("%d", &q);
  for (int i = 0; i < 3; ++i)
    {
      // cin >> cmd >> p[i].x >> p[i].y;
      scanf ("%d%d%d", &cmd, &p[i].x, &p[i].y);
      mx += p[i].x, my += p[i].y;
    }
  for (int i = 0; i < 3; ++i)
    S.insert (crd (p[i].x, p[i].y));

  for (q -= 3; q--; )
    {
      // cin >> cmd >> x >> y;
      scanf ("%d%d%d", &cmd, &x, &y);
      crd p (x, y);
      if (cmd == 1) insert (p);
      else // cout << (query (p) ? "YES" : "NO") << endl;
        printf ("%s\n", (query (p) ? "YES" : "NO"));
    }
  return 0;
}


#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstring>
#include <cassert>

using namespace std;

#ifndef ONLINE_JUDGE
#define DEBUG
#endif

#define oo 0x3F3F3F3F
#ifdef DEBUG
#define cvar(x) cerr << "[" << #x << ": " << x << "]"
#define evar(x) cvar (x) << endl
template<class T> void DISP (const char *s, T x, int n) {cerr << "[" << s << ": "; for (int i = 0; i < n; ++i) cerr << x[i] << " "; cerr << "]" << endl;}
#define disp(x,n) DISP (#x " to " #n, x, n)
#else
#define cvar(...) ({})
#define evar(...) ({})
#define disp(...) ({})
#endif
#ifdef WIN32
#define fmt64 "%I64d"
#else
#define fmt64 "%lld"
#endif
#define foreach(i, x) for (__typeof__((x).begin ()) i = (x).begin (); i != (x).end (); ++i)
#define MKP make_pair
#define Px first
#define Py second
#define PB push_back
#define sz_m(x) (int)((x).size ())
#define iter(x) (x).begin (), (x).end ()

typedef unsigned int uint;
typedef long long int64;
typedef unsigned long long uint64;
typedef vector<int> VI;
typedef map<int, int> MII;
typedef set<int> SI;
typedef pair<int, int> PII;

int64 fpm (int64 b, int64 e, int64 m) { int64 t = 1; for (; e; e >>= 1, b = b * b % m) e & 1 ? t = t * b % m : 0; return t; }
template<class T> inline bool chkmin (T &a, T b) {return a > b ? a = b, true : false;}
template<class T> inline bool chkmax (T &a, T b) {return a < b ? a = b, true : false;}
template<class T> inline T sqr (T x) {return x * x;}

template<class edge> struct Graph
{
  vector<vector<edge> > adj;
  Graph (int n) {adj.clear (); adj.resize (n + 5);}
  Graph () {adj.clear (); }
  void resize (int n) {adj.resize (n + 5); }
  void adde (int s, edge e){adj[s].push_back (e);}
  int deg (int v) {return adj[v].size (); }
  vector<edge>& operator [](int t) {return adj[t];}
};

double mx, my;

struct crd
{
  double alpha; int x, y;
  crd () {}
  crd (int x, int y) : x (x), y (y) {}
};

bool operator < (const crd &a, const crd &b) {return a.alpha < b.alpha;}

set<crd> S;
typedef set<crd>::iterator ptr;

#define turn(o,a,b) ((int64)(a.x - o.x) * (b.y - o.y) - (int64)(a.y - o.y) * (b.x - o.x))
// ptr pred (crd& x) {return x == S.begin () ? x = S.end (), 0 : 0, --x; }
// ptr next (crd& x) {return ++x, x == S.end () ? x = S.begin (), 0 : 0, x; }

crd prev (crd &x)
{
  if (S.count (x)) return x;
  ptr it = S.lower_bound (x);
  if (it == S.begin ()) return *--S.end ();
  return *--it;
}

crd next (crd &x)
{
  if (S.count (x)) return x;
  ptr it = S.lower_bound (x);
  if (it == S.end ()) return *S.begin ();
  return *it;
}

bool query (crd x)
{
  crd L = prev (x), R = next (x);
  return turn (L, x, R) <= 0;
}

void insert (crd x)
{
  crd L = prev (x), R = next (x), t;
  if (turn (L, x, R) <= 0) return ;

  for (S.erase (L); t = prev (L), turn (t, x, L) > 0; L = t)
    S.erase (L);
  S.insert (L);
  for (S.erase (R); t = next (R), turn (t, x, R) < 0; R = t)
    S.erase (R);
  S.insert (R);

  S.insert (x);
}

int main ()
{
#ifndef ONLINE_JUDGE
  freopen ("70D.in" , "r", stdin);
  freopen ("70D.out", "w", stdout);
#endif
  ios_base::sync_with_stdio (false);

  int q, cmd, x, y; crd p[3];
  double w[3] = {0.6419802878555676, 0.050906107300324535, 0.30711360484410793}
    // { 0.4352341254, 0.8242147544, 0.3614575554 }
  , sum = 0;
  // cin >> q;
  scanf ("%d", &q);
  for (int i = 0; i < 3; ++i)
    {
      sum += w[i];
      // cin >> cmd >> p[i].x >> p[i].y;
      scanf ("%d%d%d", &cmd, &p[i].x, &p[i].y);
      mx += p[i].x * w[i], my += p[i].y * w[i];
    }
  mx /= sum, my /= sum;
  for (int i = 0; i < 3; ++i)
    p[i].alpha = atan2 (p[i].y - my, p[i].x - mx), S.insert (p[i]);

  for (q -= 3; q--; )
    {
      // cin >> cmd >> x >> y;
      scanf ("%d%d%d", &cmd, &x, &y);
      crd p (x, y); p.alpha = atan2 (y - my, x - mx);
      if (cmd == 1) insert (p);
      else // cout << (query (p) ? "YES" : "NO") << endl;
        printf ("%s\n", (query (p) ? "YES" : "NO"));
    }
  return 0;
}


#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstring>
#include <cassert>

using namespace std;

#ifndef ONLINE_JUDGE
#define DEBUG
#endif

#define oo 0x3F3F3F3F
#ifdef DEBUG
#define cvar(x) cerr << "[" << #x << ": " << x << "]"
#define evar(x) cvar (x) << endl
template<class T> void DISP (const char *s, T x, int n) {cerr << "[" << s << ": "; for (int i = 0; i < n; ++i) cerr << x[i] << " "; cerr << "]" << endl;}
#define disp(x,n) DISP (#x " to " #n, x, n)
#else
#define cvar(...) ({})
#define evar(...) ({})
#define disp(...) ({})
#endif
#ifdef WIN32
#define fmt64 "%I64d"
#else
#define fmt64 "%lld"
#endif
#define foreach(i, x) for (__typeof__((x).begin ()) i = (x).begin (); i != (x).end (); ++i)
#define MKP make_pair
#define Px first
#define Py second
#define PB push_back
#define sz_m(x) (int)((x).size ())
#define iter(x) (x).begin (), (x).end ()

typedef unsigned int uint;
typedef long long int64;
typedef unsigned long long uint64;
typedef vector<int> VI;
typedef map<int, int> MII;
typedef set<int> SI;
typedef pair<int, int> PII;

int64 fpm (int64 b, int64 e, int64 m) { int64 t = 1; for (; e; e >>= 1, b = b * b % m) e & 1 ? t = t * b % m : 0; return t; }
template<class T> inline bool chkmin (T &a, T b) {return a > b ? a = b, true : false;}
template<class T> inline bool chkmax (T &a, T b) {return a < b ? a = b, true : false;}
template<class T> inline T sqr (T x) {return x * x;}

template<class edge> struct Graph
{
  vector<vector<edge> > adj;
  Graph (int n) {adj.clear (); adj.resize (n + 5);}
  Graph () {adj.clear (); }
  void resize (int n) {adj.resize (n + 5); }
  void adde (int s, edge e){adj[s].push_back (e);}
  int deg (int v) {return adj[v].size (); }
  vector<edge>& operator [](int t) {return adj[t];}
};

double mx, my;

struct crd
{
  double alpha; int x, y;
  crd () {}
  crd (int x, int y) : x (x), y (y) {}
};

bool operator < (const crd &a, const crd &b) {return a.alpha < b.alpha;}

set<crd> S;
typedef set<crd>::iterator ptr;

#define turn(o,a,b) ((int64)(a.x - o.x) * (b.y - o.y) - (int64)(a.y - o.y) * (b.x - o.x))
// ptr pred (crd& x) {return x == S.begin () ? x = S.end (), 0 : 0, --x; }
// ptr next (crd& x) {return ++x, x == S.end () ? x = S.begin (), 0 : 0, x; }

crd prev (crd &x)
{
  // if (S.count (x)) return x;
  ptr it = S.lower_bound (x);
  if (it == S.begin ()) return *--S.end ();
  return *--it;
}

crd next (crd &x)
{
  // if (S.count (x)) return x;
  ptr it = S.lower_bound (x);
  if (it == S.end ()) return *S.begin ();
  return *it;
}

bool query (crd x)
{
  crd L = prev (x), R = next (x);
  return turn (L, x, R) <= 0;
}

void insert (crd x)
{
  crd L = prev (x), R = next (x), t;
  if (turn (L, x, R) <= 0) return ;

  for (S.erase (L); t = prev (L), turn (t, x, L) > 0; L = t)
    S.erase (L);
  S.insert (L);
  for (S.erase (R); t = next (R), turn (t, x, R) < 0; R = t)
    S.erase (R);
  S.insert (R);

  S.insert (x);
}

int main ()
{
#ifndef ONLINE_JUDGE
  freopen ("70D.in" , "r", stdin);
  freopen ("70D.out", "w", stdout);
#endif
  ios_base::sync_with_stdio (false);

  int q, cmd, x, y; crd p[3];
  double w[3] = {0.6419802878555676, 0.050906107300324535, 0.30711360484410793}
    // { 0.4352341254, 0.8242147544, 0.3614575554 }
  , sum = 0;
  // cin >> q;
  scanf ("%d", &q);
  for (int i = 0; i < 3; ++i)
    {
      sum += w[i];
      // cin >> cmd >> p[i].x >> p[i].y;
      scanf ("%d%d%d", &cmd, &p[i].x, &p[i].y);
      mx += p[i].x * w[i], my += p[i].y * w[i];
    }
  mx /= sum, my /= sum;
  for (int i = 0; i < 3; ++i)
    p[i].alpha = atan2 (p[i].y - my, p[i].x - mx), S.insert (p[i]);

  for (q -= 3; q--; )
    {
      // cin >> cmd >> x >> y;
      scanf ("%d%d%d", &cmd, &x, &y);
      crd p (x, y); p.alpha = atan2 (y - my, x - mx);
      if (cmd == 1) insert (p);
      else // cout << (query (p) ? "YES" : "NO") << endl;
        printf ("%s\n", (query (p) ? "YES" : "NO"));
    }
  return 0;
}


#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstring>
#include <cassert>

using namespace std;

#ifndef ONLINE_JUDGE
#define DEBUG
#endif

#define oo 0x3F3F3F3F
#ifdef DEBUG
#define cvar(x) cerr << "[" << #x << ": " << x << "]"
#define evar(x) cvar (x) << endl
template<class T> void DISP (const char *s, T x, int n) {cerr << "[" << s << ": "; for (int i = 0; i < n; ++i) cerr << x[i] << " "; cerr << "]" << endl;}
#define disp(x,n) DISP (#x " to " #n, x, n)
#else
#define cvar(...) ({})
#define evar(...) ({})
#define disp(...) ({})
#endif
#ifdef WIN32
#define fmt64 "%I64d"
#else
#define fmt64 "%lld"
#endif
#define foreach(i, x) for (__typeof__((x).begin ()) i = (x).begin (); i != (x).end (); ++i)
#define MKP make_pair
#define Px first
#define Py second
#define PB push_back
#define sz_m(x) (int)((x).size ())
#define iter(x) (x).begin (), (x).end ()

typedef unsigned int uint;
typedef long long int64;
typedef unsigned long long uint64;
typedef vector<int> VI;
typedef map<int, int> MII;
typedef set<int> SI;
typedef pair<int, int> PII;

int64 fpm (int64 b, int64 e, int64 m) { int64 t = 1; for (; e; e >>= 1, b = b * b % m) e & 1 ? t = t * b % m : 0; return t; }
template<class T> inline bool chkmin (T &a, T b) {return a > b ? a = b, true : false;}
template<class T> inline bool chkmax (T &a, T b) {return a < b ? a = b, true : false;}
template<class T> inline T sqr (T x) {return x * x;}

template<class edge> struct Graph
{
  vector<vector<edge> > adj;
  Graph (int n) {adj.clear (); adj.resize (n + 5);}
  Graph () {adj.clear (); }
  void resize (int n) {adj.resize (n + 5); }
  void adde (int s, edge e){adj[s].push_back (e);}
  int deg (int v) {return adj[v].size (); }
  vector<edge>& operator [](int t) {return adj[t];}
};

double mx, my;

struct crd
{
  double alpha; int x, y;
  crd () {}
  crd (int x, int y) : x (x), y (y) {}
};

bool operator < (const crd &a, const crd &b) {return a.alpha < b.alpha;}

set<crd> S;
typedef set<crd>::iterator ptr;

#define turn(o,a,b) ((int64)(a.x - o.x) * (b.y - o.y) - (int64)(a.y - o.y) * (b.x - o.x))
// ptr pred (crd& x) {return x == S.begin () ? x = S.end (), 0 : 0, --x; }
// ptr next (crd& x) {return ++x, x == S.end () ? x = S.begin (), 0 : 0, x; }

crd prev (crd &x)
{
  if (S.count (x)) return x;
  ptr it = S.lower_bound (x);
  if (it == S.begin ()) return *--S.end ();
  return *--it;
}

crd next (crd &x)
{
  if (S.count (x)) return x;
  ptr it = S.upper_bound (x);
  if (it == S.end ()) return *S.begin ();
  return *it;
}

bool query (crd x)
{
  crd L = prev (x), R = next (x);
  return turn (L, x, R) <= 0;
}

void insert (crd x)
{
  crd L = prev (x), R = next (x), t;
  if (turn (L, x, R) <= 0) return ;

  for (S.erase (L); t = prev (L), turn (t, x, L) > 0; L = t)
    S.erase (L);
  S.insert (L);
  for (S.erase (R); t = next (R), turn (t, x, R) < 0; R = t)
    S.erase (R);
  S.insert (R);

  S.insert (x);
}

int main ()
{
#ifndef ONLINE_JUDGE
  freopen ("70D.in" , "r", stdin);
  freopen ("70D.out", "w", stdout);
#endif
  ios_base::sync_with_stdio (false);

  int q, cmd, x, y; crd p[3]; double w[3] = {0.6419802878555676, 0.050906107300324535, 0.30711360484410793};
  // cin >> q;
  scanf ("%d", &q);
  for (int i = 0; i < 3; ++i)
    {
      // cin >> cmd >> p[i].x >> p[i].y;
      scanf ("%d%d%d", &cmd, &p[i].x, &p[i].y);
      mx += p[i].x * w[i], my += p[i].y * w[i];
    }
  for (int i = 0; i < 3; ++i)
    p[i].alpha = atan2 (p[i].y * 3 - my, p[i].x * 3 - mx), S.insert (p[i]);

  for (q -= 3; q--; )
    {
      // cin >> cmd >> x >> y;
      scanf ("%d%d%d", &cmd, &x, &y);
      crd p (x, y); p.alpha = atan2 (y * 3 - my, x * 3 - mx);
      if (cmd == 1) insert (p);
      else // cout << (query (p) ? "YES" : "NO") << endl;
        printf ("%s\n", (query (p) ? "YES" : "NO"));
    }
  return 0;
}


#include <iostream>
#include <stdlib.h>
using namespace std;
string s; char a; int i;
main()
{
cin>>s;
for (i=0; i<s.size(); i++)
if (s[i]==s[i-1] && s[i]==s[i+1])
s[i]=s[i]+(rand()%27+97);

for (i=0; i<s.size(); i++)
if (s[i]==s[i-1] || s[i]==s[i+1])
s[i]=s[i]+(rand()%27+97);

cout<<s<<endl;
// system ("pause");
}


#include <iostream>
using namespace std;
string s; char a; int i;
main()
{
cin>>s;
for (i=0; i<s.size(); i++)
if (s[i]==s[i-1] && s[i]==s[i+1])
s[i]=s[i]+1;

for (i=0; i<s.size(); i++)
if (s[i]==s[i-1] || s[i]==s[i+1])
s[i]=s[i]+1;

cout<<s<<endl;
// system ("pause");
}


#include <iostream>
#include <stdlib.h>
using namespace std;
string s; char a; int i;
main()
{
cin>>s;
for (i=0; i<s.size(); i++)
if (s[i]==s[i-1] && s[i]==s[i+1])
{
 if (s[i]!='a')
 s[i]='a';
 else
 if (s[i]!='b')
 s[i]='b';
 else
 s[i]='c';
}

for (i=0; i<s.size(); i++)
if (s[i]==s[i-1] || s[i]==s[i+1])
{
 if (s[i]!='a')
 s[i]='a';
 else
 if (s[i]!='b')
 s[i]='b';
 else
 s[i]='c';
}

cout<<s<<endl;
// system ("pause");
}


#include <iostream>
#include <stdlib.h>
using namespace std;
string s; char a; int i;
main()
{
cin>>s;
for (i=0; i<s.size(); i++)
if (s[i]==s[i-1] && s[i]==s[i+1])
{
 if (s[i]!='a')
 s[i]='a';
 else
 if (s[i]!='b')
 s[i]='b';
 else
 s[i]='c';
}

for (i=0; i<s.size(); i++)
if (s[i]==s[i-1] || s[i]==s[i+1])
{
 if (s[i]!='c')
 s[i]='c';
 else
 if (s[i]!='a')
 s[i]='a';
 else
 s[i]='b';
}

cout<<s<<endl;
// system ("pause");
}


#include <iostream>
#include <cstring>
#include <string>

using namespace std;

int main()
{
    string s;
    while(cin>>s)
    {
        int len=s.size();
        for(int i=1;i<len;i++)
        {
            if(s[i]==s[i-1])
            {
               char c=s[i];
               if(c=='z')
               c='a';
               c++;
               if(c==s[i+1])
                c++;
               s[i]=c;
            }
        }
        for(int i=0;i<s.size();i++)
            cout<<s[i];
        cout<<endl;
    }
    return 0;
}


#include <iostream>
#include <cstring>
#include <string>

using namespace std;

int main()
{
    string s;
    while(cin>>s)
    {
        int len=s.size();
        for(int i=1;i<len;i++)
        {
            if(s[i]==s[i-1])
            {
                if(s[i]=='z')
                s[i]='a';
                s[i]++;
                if(s[i]==s[i+1])
                    s[i]++;
            }
        }
        for(int i=0;i<s.size();i++)
            cout<<s[i];
        cout<<endl;
    }
    return 0;
}


#include <iostream>
#include <cstring>
#include <string>

using namespace std;

int main()
{
    string s;
    while(cin>>s)
    {
        int len=s.size();
        for(int i=1;i<len;i++)
        {
            if(s[i]==s[i-1])
            {
                if(s[i]=='z')
                    s[i]='a';
                s[i]++;
                if(s[i]=='z')
                    s[i]='a';
                if(s[i]==s[i+1])
                s[i]++;
            }
        }
        for(int i=0;i<s.size();i++)
            cout<<s[i];
        cout<<endl;
    }
    return 0;
}