program criminala;
var
n,m,i,j,num,ans1,ans2:longint;
a,b,max,min:array[1..1000] of longint;
begin
assign(input,'criminala.in');
assign(output,'criminala.out');
reset(input);
rewrite(output);
readln(n,m);
for i:=1 to m do
begin
readln(num);
if num>0 then a[num]:=a[num]+1
else b[abs(num)]:=b[abs(num)]+1;
end;
for i:=1 to n do
begin
if a[i]>b[i]
then
begin
max[i]:=a[i];
min[i]:=b[i];
end
else
begin
max[i]:=b[i];
min[i]:=a[i];
end;
end;
for i:=1 to n do
begin
ans1:=ans1+max[i];
ans2:=ans2+min[i];
end;
writeln(ans1);
writeln(ans2);
close(input);
close(output);
end.