Program hotrotinhoc;
var a,b: array[1..6] of integer;
i,j,tg: integer;
begin
a[1]:=3; a[2]:=1; a[3]:=7; a[4]:=9; a[5]:=5;
b[1]:=10; b[2]:=2; b[3]:=8; b[4]:=9; b[5]:=6; b[6]:=5;
for i:=1 to 5 do
for j:=i to 5 do
if a[i]>a[j] then
begin
tg:=a[i];
a[i]:=a[j];
a[j]:=tg;
end;
write('Day 1 sau khi doi cho la : ');
for i:=1 to 5 do write(a[i],' ');
writeln;
write('Day 2 sau khi doi cho la : ');
for i:=1 to 6 do
for j:=i to 6 do
if b[i]<b[j] then
begin
tg:=b[i];
b[i]:=b[j];
b[j]:=tg;
end;
for i:=1 to n do write(b[i],' ');
readln
end.