Program gt;
var a:array[1..100000]of integer;
i,h,j,k,p:integer;
begin
randomize;
readln(h);
for i:=1 to h do
begin
a[i]:=random(101)-50;
write(a[i],' ');
end;
writeln;
for i:=1 to h-1 do
for j:=1 to h-1 do
begin
k:=a[j+1];
if(a[j]>a[j+1])then begin
a[j+1]:=a[j];
a[j]:=k;
end;
end;
p:=0;k:=1;
for i:=2 to h do
begin
if(a[i]=a[i-1])then k:=k+1;
if(a[i]<>a[i-1])or(i=h)then begin
if(k>=2)then begin
p:=p+1;
writeln(a[i-1],' ',a[i-1]);
end;
k:=1;
end;
end;
writeln(p,' кол-во парных чисел без повторений');
end.