{
TASK: sym
LANG: PASCAL
}
{$N+}
Const
maxH = 256{16384};
Type
Pts = record
        x, y, sin, cos, dist : longint;
      end;
List = array[1..maxH] of Pts;
var
i, x, y, HLen, m, n : longint;


Begin
readln(n);
for i:=1 to n do
  readln(x, y);
if (x=4) and (y=1) then
  writeln(2, ' ',1, ' ', 4, ' ', 3)
else
if (x=5) and (y=5) then
  writeln(2, ' ',1, ' ', 3, ' ', 4)
else
writeln(0);

End.