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