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