program xxxx;
var i,n,m,x,y,w:longint;
a:array[1..50000] of integer;
f:array[1..1000,1..2] of longint;
begin
assign(input,'criminala.in');
reset(input);
assign(output,'criminala.out');
rewrite(output);
read(n,m);
x:=0;
y:=0;
for i:=1 to n do
begin
f[i,1]:=0;
f[i,2]:=0;
end;
for i:=1 to m do
begin
read(a[i]);
if a[i]>0 then
inc(f[a[i],1])
else
begin
w:=-a[i];
inc(f[w,2]);
end;
end;
for i:=1 to n do
if f[i,1]>f[i,2] then
begin
x:=x+f[i,1];
y:=y+f[i,2];
end
else
begin
x:=x+f[i,2];
y:=y+f[i,1];
end;
writeln(x);
write(y);
close(input);
close(output);
end.