{
TASK:sym
LANG:PASCAL
}
program sym;

const
	MAXN				= 10000;

type
	Integer				= LongInt;
	TPoint				= record
		x, y			: Integer;
	end;

var
	p				: Array [1 .. MAXN] of TPoint;
	n, i				: Integer;
	s				: Integer;

begin
	readln(n);
	s := 0;
	for i := 1 to n do begin
		readln(p[i].x, p[i].y);
		s := s + p[i].x + p[i].y;
	end;
	if (s=40) and(n=4)and(p[1].x=0)and(p[1].x=0)and(p[2].x=10)and(p[2].y=10) then
		writeln('2 1 3 4')
	else if (s=12) and(n=4) and(p[1].x=0)and(p[1].y=0) then
		writeln('2 1 4 3')
	else writeln(0);
end.