program Max_Min;
uses crt;
var i,n: inreger; max,min: real;
a : array [1..10000] of real;
begin
clrscr; readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end; max:=a[1]; min:=a[1];
for i:=2 to n do
begin
if max<a[i] then max:=a[i];
if min>a[i] then min:=a[i];
end;
writeln('So lon nhat : ',max:2:2);
writeln('So nho nhat : ',min:2:2);
readln
end.