uses crt;
var a,b,c:array[1..100]of integer;
i,n,dem,dem1:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
dem:=0;
dem1:=0;
for i:=1 to n do
begin
if a[i] mod 2=0 then
begin
inc(dem);
b[dem]:=a[i];
end
else begin
ic(dem1);
c[dem1]:=a[i];
end;
end;
writeln('Co ',dem,' so chan');
writeln('Co ',dem1,' so le');
if dem>0 then
begin
write('Cac so chan la: ');
for i:=1 to dem do
write(b[i]:4);
end;
if dem1>0 then
begin
write('Cac so le la: ');
for i:=1 to dem1 do
write(c[i]:4);
end;
readln;
end.