#include <bits/stdc++.h>
using namespace std;
const int mod = 100003;
int a[1010] = {1,1};
int n,m;
long long ping(int x,int y){
if(y == 0)return 1;
if(y == 1)return x;
long long z = ping(x,y/2) % mod;
if(y % 2) return (z * z %mod) * x % mod;
return z * z % mod;
}
int main(){
freopen("com.in","r",stdin);
freopen("com.out","w",stdout);
scanf("%d%d",&n,&m);
for(int i = 1;i <= 1000;i++){
a[i] = a[i-1] * i % mod;
}
long long c = (long long)a[n-m] * a[m] % mod;
printf("%lld",(long long)ping(c,mod-2) % mod * a[n] % mod);
return 0;
}