Program HOC24;
var j,d,d1,i,n,tg: integer;
begin
write('Nhap so ban hoc sinh : '); readln(n);
for i:=1 to n do
begin
write('Nhap diem cua ban thu ',i,' : '); readln(a[i]);
if a[i]>5 then inc(d) else inc(d1);
end;
writeln('Co ',d,' hoc sinh dau va ',d1,' hoc sinh thi lai');
for i:=1 to n do
for j:=i to n do
if a[i]>a[j] then
begin
tg:=a[i];
a[i]:=a[j];
a[j]:=tg;
end;
for i:=1 to n do write(a[i],' ');
readln
end.