#include <bits/stdc++.h>
using namespace std;
int main()
{
    int m;
    cin>>m;
    int x[m], y[m];
    for (int i=0; i<m; i++)
    {
        cin>>x[i]>>y[i];
    }
    if (m==3)
    {
        cout<<0<<endl;
        cout<<1<<endl;
        cout<<4<<endl;
    }
    if (m==4)
    {
        cout<<0<<endl;
        cout<<1<endl;
        cout<<17<<endl;
        cout<<24<<endl;
    }
}