//#pragma GCC optimize("Ofast,unroll-loops")
//#pragma GCC target("avx2")
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <cmath>
#include <map>
#include <set>
#include <numeric>
#include <unordered_map>
#include <unordered_set>
#include <bitset>
#include <queue>
#include <deque>
#include <random>
#include <ctime>
using namespace std;
using ll = int;
using ld = long double;
using pll = pair<ll, ll>;
using vpll = vector<pll>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vvll = vector<vll>;
using vb = vector<bool>;
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()

#include "triangles.h"
//#include "guess.h"
//struct Triangle {
//	int i, j, k;
//	Triangle() = default;
//	Triangle(int i_, int j_, int k_) : i(i_), j(j_), k(k_) {}
//};
//int compare(const std::vector<Triangle>& left, const std::vector<Triangle>& right) {
//	return 1;
//};

void in(vll& a) {
	for (ll& i : a) cin >> i;
}

void out(vll& a) {
	for (ll& i : a) cout << i << ' ';
	cout << '\n';
}

void out(vvll& a) {
	for (ll i = 0; i < a.size(); ++i) {
		for (ll j = 0; j < a[0].size(); ++j) {
			cout << a[i][j] << ' ';
		}
		cout << '\n';
	}
}

void in(vpll& a) {
	for (pll& i : a) cin >> i.first >> i.second;
}

void in(vvll& a) {
	for (auto& v : a) {
		for (auto& x : v) cin >> x;
	}
}

struct pt {
	ll x = 0, y = 0;

	pt(){}
	pt(ll x, ll y): x(x), y(y) {}

	const ll operator*(const pt& other) const {
		return x * other.x + y * other.y;
	}

	const ll operator%(const pt& other) const {
		return x * other.y - y * other.x;
	}

	const bool operator<(const pt& other) const {
		return x == other.x ? y < other.y : x < other.x;
	}

	const bool operator==(const pt& other) const {
		return x == other.x && y == other.y;
	}

	pt operator-(const pt& other) const {
		return pt(x - other.x, y - other.y);
	}

	pt operator+(const pt& other) const {
		return pt(x + other.x, y + other.y);
	}
};

void in(pt& p) {
	cin >> p.x >> p.y;
}

void out(pt& p) {
	cout << p.x << ' ' << p.y << '\n';
}

ld angle(pt a, pt b) {
	return atan2((ld)(a % b), (ld)(a * b));
}

using vpt = vector<pt>;

vpt hull(vpt ps) {
	sort(ps.begin(), ps.end());
	vpt h{ ps[0] };
	ll n = ps.size();
	ll nxt;
	ld cura;
	pt st = ps[0];
	vb used(n);
	used[0] = 1;
	for (ll i = 1; i < n; ++i) {
		nxt = -1;
		for (ll j = 0; j < n; ++j) {
			if (!used[j]) {
				nxt = j;
				break;
			}
		}
		for (ll j = 0; j < n; ++j) {
			if (used[j]) continue;
			pt vprev, vcur;
			vprev = ps[nxt] - h.back();
			vcur = ps[j] - h.back();
			if (vprev % vcur > 0) {
				nxt = j;
			}
		}
		if (i != 1) {
			pt vprev, vcur;
			vprev = ps[nxt] - h.back();
			vcur = st - h.back();
			if (vprev % vcur > 0) {
				break;
			}
		}
		if (nxt == -1 || ps[nxt] == st) break;
		used[nxt] = 1;
		h.push_back(ps[nxt]);
	}
	return h;
}

vvll solve(ll n) {
	/*
	ll n;
	cin >> n;
	vpt ps(n);
	for (auto& p : ps) in(p);
	map<pt, ll> idx;
	for (ll i = 0; i < n; ++i) {
		idx[ps[i]] = i;
	}
	auto h = hull(ps);
	cout << h.size() << '\n';*/
	vvll ans, vs;
	for (ll i1 = 0; i1 < n; ++i1) {
		set<ll> sqs;
		for (ll i2 = (i1 + 1) % n; i2 != i1; i2 = (i2 + 1) % n) {
			for (ll i3 = (i2 + 1) % n; i3 != i1; i3 = (i3 + 1) % n) {
				vs.push_back({ i1, i2, i3 });
			}
		}
	}
	for (auto v : vs) {
		ll a = v[0], b = v[1], c = v[2];
		auto t = Triangle(a, b, c);
		for (ll q = 0; q < n; ++q) {
			if (q == a || q == b || q == c) continue;
			auto t1 = Triangle(q, a, b);
			auto t2 = Triangle(q, b, c);
			auto t3 = Triangle(q, a, c);
			if (!compare({ t }, { t1, t2, t3 })) {
				ans = {{ a, b, c }};
				return ans;
			}
		}
	}
	ans = { {0, 1, 2, 3} };
	return ans;
}

//int main() {
//	ios::sync_with_stdio(0); cin.tie(0);
//	ll ts = 1;
//	//cin >> ts;
//	while (ts--) solve();
//}