/*{
ZADATAK: kartice
JEZIK: cpp
}*/

#include <fstream.h>
#include <list.h>

struct Hole
{
	Hole();
	int x, y;
};

class Kartica
{
private:
	list<Hole> rupe;
public:
	Kartica();
	void izbusi(int, int);
	list<Hole>::iterator minX();
	list<Hole>::iterator minY();
	int proveri();
};

list<Hole>::iterator Kartica::minX()
{
	list<Hole>::iterator x = rupe.begin();
	Hole tmp;
	Hole tmpx=*x;
	
	for (list<Hole>::iterator i=rupe.begin(); i != rupe.end(); i++)
	{
		tmp = *i;
		if(tmp.x<tmpx.x) x=i;
	}
	
	return x;
}

list<Hole>::iterator Kartica::minY()
{
	list<Hole>::iterator y = rupe.begin();
	Hole tmp;
	Hole tmpy=*y;
	
	for (list<Hole>::iterator i=rupe.begin(); i != rupe.end(); i++)
	{
		tmp = *i;
		if(tmp.y<tmpy.y) y=i;
	}
	
	return y;
}

Kartica::Kartica()
{
}

void Kartica::izbusi(int a, int b)
{
	Hole tmp;
	
	tmp.x=a;
	tmp.y=b;
	
	rupe.push_back (tmp);
}

int Kartica::proveri()
{
	int a = 0;
	int b, c, tmp;
	list<Hole>::iterator x,y;
	Hole tmpb, tmpc, tmpx, tmpy;
	
	x=minX();
	y=minY();
	
	for (list<Hole>::iterator i=rupe.begin(); i != rupe.end(); i++)
	{
		tmpb=*i;
		tmpx=*x;
		tmpy=*y;
		b=tmpb.x-tmpx.x;
		c=tmpb.y-tmpx.y;
		tmp=0;
		for(list<Hole>::iterator j=rupe.begin(); j != rupe.end(); j++)
		{
			tmpb=*j;
			for(list<Hole>::iterator k=rupe.begin(); k != rupe.end(); k++)
			{
				tmpc=*k;
				if(tmpb.x + b == tmpc.x && tmpb.y + c == tmpc.y) tmp++;
			}
		}
		
		if (tmp>a && tmp<rupe.size()) a=tmp;
		
		tmpb=*i;
		b=tmpb.x-tmpy.x;
		c=tmpb.y-tmpy.y;
		
		tmp=0;
		for(list<Hole>::iterator j=rupe.begin(); j != rupe.end(); j++)
		{
			tmpb=*j;
			for(list<Hole>::iterator k=rupe.begin(); k != rupe.end(); k++)
			{
				tmpc=*k;
				if(tmpb.x + b == tmpc.x && tmpb.y + c == tmpc.y) tmp++;
			}
		}
		
		if (tmp>a && tmp<rupe.size()) a=tmp;
		
	}		
	return a;
}

Hole::Hole()
{
	x=0;
	y=0;
}

int main()
{
	ifstream input("kartice.in");
	ofstream output("kartice.out");
	
	int n, a, b;
	Kartica card;
		
	input >> n;
	
	for(int i=0; i<n; i++)
	{
		input >> a >> b;
		card.izbusi(a, b);
		output << card.proveri() << endl;
	}

	return 0;
}
