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