#include <fstream>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <set>
#include <utility>
#include <bitset>
#include <iterator>

/*#define x qwedqwe
#define y sflasl
*/
using namespace std;

long long gcd(long long a, long long b)
{
    return a == 0 ? b : gcd(b % a, a);
}

struct point
{
    long long x, y;
    int id;
    point(): x(0), y(1), id(0) {};
    point(long long x, long long y, int id): x(x), y(y), id(id) {};
	point(point a, point b)
	{
		long long q = a.x * b.y + a.y * b.x;
		long long w = 2 * b.y * a.y;
		long long g = gcd(q, w);
		x = q / g, y = w / g;
		id = 0;
	};
	bool operator==(const point& b) const
	{
		return (y == b.y) && (x == b.x);
	}
	bool operator<(const point& b) const
	{
		return x < b.x || (x == b.x && y < b.y);
	}
};

int main()
{
	ifstream cin("points.in");
	ofstream cout("points.out");
    int n;
    cin >> n;
    set<point> check;
	set<point> cur;
	bitset<1501> used;
    for (int i = 0; i < n; i++)
    {
        long long x, y; 
		cin >> x >> y;
		point p = point(x, y, i + 1); 
		if (x == 0 && y == 1 || x == 1 && y == 1)
		{
			used[i] = true;
			cur.insert(p);
		}
        check.insert(p);
	}
	vector<point> answer;
	while (true)
	{
	   bool f = false;
	   vector<point> add;
	   for (set<point>::iterator it1 = cur.begin(); it1 != cur.end(); it1++)
		   for (set<point>::iterator it2 = it1; it2 != cur.end(); it2++)
		   {
			   if (it1 == it2) continue;
			   point mid = point(*it1, *it2);
			   if (check.count(mid) == 1)
			   {
				   f = true;
				   set<point>::iterator it = check.find(mid);
				   used[(*it).id - 1] = true;
				   answer.push_back(point((*it).id, (*it1).id, (*it2).id));
				   add.push_back(*it);
				   check.erase(it);
			   }
		   }
		for (int i = 0; i < add.size(); i++)
			cur.insert(add[i]);
		if (!f || check.size() == 2) break;
	}
	if (check.size() != 2)
	{
		cout << "NO\n";
		for (int i = 0; i < n; i++)
			if (!used[i]) 
			{
				cout << i + 1 << "\n";
				break;
			}
		return 0;
	}
	else
	{
		cout << "YES\n";
		for (int i = 0; i < answer.size(); i++)
			cout << answer[i].x << " " << answer[i].y << " " << answer[i].id << "\n";
		return 0;
	}
}
