program criminala;
var n,m,i,w1,w2,s:longint;
a:array[-1000..1000]of longint;
function max(x,y:longint):longint;
begin
if x>y then exit(x) else exit(y);
end;
function min(x,y:longint):longint;
begin
if x<y then exit(x) else exit(y);
end;
begin
assign(input,'criminala.in'); reset(input);
assign(output,'criminala.out'); rewrite(output);
readln(n,m);
fillchar(a,sizeof(a),0);
for i:=1 to m do
begin
readln(s);
inc(a[s]);
end;
w1:=0; w2:=0;
for i:=1 to n do
begin
inc(w1,max(a[i],a[-i]));
inc(w2,min(a[i],a[-i]));
end;
writeln(w1);
writeln(w2);
close(input); close(output);
end.