Program dv;
var N, i, one, min, mini: integer;
ar:array of integer;
begin
readln(N);
setlength(ar, N+1);
for i:=1 to N do readln(ar[i]);
for i:=1 to N do begin
if ar[i]=1 then inc(one);
end;
for i:=1 to N do begin
if ar[i]>0 then ar[i]:=0;
end;
min:=ar[1];
mini:=1;
for i:=2 to N do begin
if ar[i]< min then begin min:=ar[i]; mini:=i; end;
end;
for i:=1 to N do write(ar[i], ' ');
writeln;
writeln(min, ' ', mini);
end.