var
n,m,i,j,total,t,s:longint;
a,b:array[0..2000]of longint;
function max(x,y:longint):longint;
begin
if x>y then exit(x);
exit(y);
end;
function min(x,y:longint):longint;
begin
if x<y then exit(x);
exit(y);
end;
begin
assign(input,'criminala.in'); reset(input);
assign(output,'criminala.out'); rewrite(output);
readln(n,m);
for i:=1 to m do
begin
readln(s);
if s>0 then
inc(a[abs(s)])
else inc(b[abs(s)]);
end;
for i:=1 to n do
begin
inc(total,max(a[i],b[i]));
inc(t,min(a[i],b[i]));
end;
writeln(total);
writeln(t);
close(input);
close(output);
end.