program hull;

const
	MAXN				= 1000;

type
	TPoint				= record
		x, y			: Real;
		ind			: Integer;
	end;

var
	Pnt				: Array [1 .. MAXN] of TPoint;
	P				: Array [1 .. MAXN] of TPoint;
	used				: Array [1 .. MAXN] of Boolean;
	N, PN				: Integer;
	i, j				: Integer;

procedure readInput;
begin
	readln(N);
	for i := 1 to N do begin
		read(Pnt[i].x, Pnt[i].y);
		Pnt[i].ind := i;
	end;
end;

procedure sort(b, e: Integer);
var
  	i, j				: Integer;
	temp				: TPoint;
	x				: Real;
begin
  	i := b; 
	j := e; 
	x := Pnt[(b + e) div 2].x;
  	repeat
    		while (Pnt[i].x < x) do 
			i := i + 1;
    		while (x < Pnt[j].x) do 
			j := j - 1;
    		if (i <= j) then begin
      			temp := Pnt[i]; 
			Pnt[i] := Pnt[j]; 
			Pnt[j] := temp;
      			i := i + 1; 
			j := j - 1;
    		end;
  	until (i > j);
  	if (b < j) then 
		sort(b, j);
  	if (i < e) then 
		sort(i, e);
end;

procedure sort2(b, e: Integer);
var
  	i, j				: Integer;
	temp				: TPoint;
	x				: Real;
	y				: Real;
begin
  	i := b; 
	j := e; 
	x := P[(b + e) div 2].x;
	y := P[(b + 2) div 2].y;
  	repeat
    		while (P[i].x < x) do 
			i := i + 1;
		while (P[i].x = x) and (P[i].y < y) do
			i := i + 1;
    		while (x < P[j].x) do 
			j := j - 1;
		while (x = P[j].x) and (y < P[j].y) do
			j := j - 1;
    		if (i <= j) then begin
      			temp := P[i]; 
			P[i] := P[j]; 
			P[j] := temp;
      			i := i + 1; 
			j := j - 1;
    		end;
  	until (i > j);
  	if (b < j) then 
		sort2(b, j);
  	if (i < e) then 
		sort2(i, e);
end;

function A(i, j: TPoint): Real;
begin
	A := i.y - j.y;
end;

function B(i, j: TPoint): Real;
begin
	B := j.x - i.x;
end;

function C(i, j: TPoint): Real;
begin
	C := (i.x * j.x) - (j.y * i.y);
end;

procedure Solve;
var
	curr				: TPoint;
	mA, mB, mC			: Real;
	porn				: Boolean;
	boza				: Boolean;
	found				: Boolean;
	temp				: TPoint;
begin
	sort(1, N);
	PN := 1;
	P[1] := Pnt[1];
	for i := 1 to N do
		used[i] := False;
	curr := P[1];
	used[1] := True;
	repeat
		found := False;
		for i := 1 to N do
			if (not used[i]) then begin
				mA := A(curr, Pnt[i]);
				mB := B(curr, Pnt[i]);
				mC := C(curr, Pnt[i]);
				if (mA * Pnt[i + 1].x + mB * Pnt[i + 1].y + mC > 0) then
					porn := False
				else
					porn := True;
				boza := False;
				for j := 1 to i do
					if (not used[j]) then
						if (porn) then begin
							if (mA * Pnt[j].x + mB * Pnt[j].y + mC < 0) then begin
								boza := True;
								break;
							end;
						end else if (mA * Pnt[j].x + mB * Pnt[j].y + mC > 0) then begin
							boza := True;
							break;
						end;
				for j := i + 2 to N do
					if (not used[j]) then
						if (porn) then begin
							if (mA * Pnt[j].x + mB * Pnt[j].y + mC < 0) then begin
								boza := True;
								break;
							end;
						end else if (mA * Pnt[j].x + mB * Pnt[j].y + mC > 0) then begin
							boza := True;
							break;
						end;
				if (not boza) then begin
					PN := PN + 1;
					P[PN] := Pnt[i];
					used[i] := True;
					found := True;
					curr := Pnt[i];
					break;
				end;
			end;
	until (not found);
	for i := 1 to PN - 1 do
		for j := i + 1 to PN do
			if (P[i].x > P[j].x) or ((P[i].x = P[j].x) and (P[i].y > P[j].y)) then begin
				temp := P[i];	
				P[i] := P[j];
				P[j] := temp;
			end;
	writeln(PN);
	for i := 1 to PN do
		write(P[i].ind, ' ');
	writeln;
end;

begin
	readInput;
	Solve;
end.	