#include <bits/stdc++.h>
#include "office.h"
using namespace std;
typedef long long ll;
int main()
{
cin.tie(0)->sync_with_stdio(0);
int n = GetN();
vector<int> otherline;
int a, b;
if (isOnLine(1, 2, 3))
{
// [{1, 2, 3}]
a = 1;
b = 2;
if (!isOnLine(1, 2, 4))
otherline.push_back(4);
}
else if (isOnLine(1, 2, 4))
{
// [{1, 2}, {3}]
a = 1;
b = 2;
otherline = {3};
}
else if (isOnLine(2, 3, 4))
{
// [{2, 3}, {1}]
a = 2;
b = 3;
otherline = {1};
}
else if (isOnLine(2, 3, 4))
{
// [{3, 1}, {2}]
a = 1;
b = 3;
otherline = {2};
}
else
{
// [{1, 2}, {3, 4}] or [{1, 3}, {2, 4}] or [{2, 3}, {1, 4}].
if (isOnLine(1, 2, 5) || isOnLine(3, 4, 5))
{
Answer(1, 2, 3, 4);
return 0;
}
if (isOnLine(1, 3, 5) || isOnLine(2, 4, 5))
{
Answer(1, 3, 2, 4);
return 0;
}
Answer(2, 3, 1, 4);
return 0;
}
for (int i = 5; i <= n && otherline.size() < 2; i++)
if (!isOnLine(a, b, i))
otherline.push_back(i);
Answer(a, b, otherline[0], otherline[1]);
return 0;
}