program cojs1040;
const
p=100003;
var
i,j,k,n:longint;
m:int64;
function ksm(a,b,c:int64):longint;
var
y:longint;
begin
y:=1;
while b>0 do
begin
if b mod 2=1 then y:=y*a mod c;
a:=a*a mod p;
b:=b div 2;
end;
exit(y);
end;
begin
assign(input,'com.in');
assign(output,'com.out');
reset(input);
rewrite(output);
readln(n,k);
m:=1;
for i:=1 to n do
m:=m*i mod p;
j:=1;
for i:=1 to k do
j:=j*i mod p;
for i:=1 to n-k do
j:=j*i mod p;
m:=m*ksm(j,p-2,p)mod p;
writeln(m);
close(input);
close(output);
end.