program pr;
Var
n,k,i,s,q:integer;
a:array[1..100000] of integer;
b:array[1..100000] of integer;
Begin
q:=0;
read(n,k);
for i:=1 to n do
readln(a[i]);
for i:=1 to n do
b[i]:=k-a[i];
for i:=1 to n do begin
if b[i]<0 then s:=abs(b[i]);
if b[i]>=0 then q:=q+b[i] ;
end;
write(s,' ',q)
End.
cHJvZ3JhbSBwcjsKICAgICBWYXIKICAgICBuLGssaSxzLHE6aW50ZWdlcjsKICAgICBhOmFycmF5WzEuLjEwMDAwMF0gb2YgaW50ZWdlcjsKICAgICBiOmFycmF5WzEuLjEwMDAwMF0gb2YgaW50ZWdlcjsKQmVnaW4KICAgICBxOj0wOwogICAgIHJlYWQobixrKTsKICAgICBmb3IgaTo9MSB0byBuIGRvCiAgICAgcmVhZGxuKGFbaV0pOwogICAgIGZvciBpOj0xIHRvIG4gZG8KICAgICBiW2ldOj1rLWFbaV07CiAgICAgZm9yIGk6PTEgdG8gbiBkbyBiZWdpbgogICAgIGlmIGJbaV08MCB0aGVuIHM6PWFicyhiW2ldKTsKICAgICBpZiBiW2ldPj0wIHRoZW4gcTo9cStiW2ldIDsKICAgICBlbmQ7Cgp3cml0ZShzLCcgJyxxKQpFbmQuCg==