var
i:longint;
max,min,ca,n,m:int64;
az,af:array[1..50000] of integer;
begin
assign(input,'criminala.in');
assign(output,'criminala.out');
reset(input);
rewrite(output);
//while not(eof) do
//begin
readln(n,m);
fillchar(az,sizeof(az),0);
fillchar(af,sizeof(af),0);
for i:=1 to m do
begin
readln(ca);
if ca>0 then
inc(az[ca]);
if ca<0 then
inc(af[-ca]);
end;
max:=0;
min:=0;
for i:=1 to m do
if az[i]>af[i] then
begin
inc(max,az[i]);
inc(min,af[i]);
end
else
begin
inc(max,af[i]);
inc(min,az[i]);
end;
writeln(max);
writeln(min);
//end;
close(input);
close(output);
end.