# 题目大意

n,m 1e18。模数p是1e5+3。

# 做法

$\sum _{i=0}^{n}{C}_{n}^{i}{C}_{m}^{i}{2}^{i}$$\sum_{i=0}^nC_n^iC_m^i2^i$

#include<cstdio>
#include<algorithm>
#define fo(i,a,b) for(i=a;i<=b;i++)
#define fd(i,a,b) for(i=a;i>=b;i--)
using namespace std;
typedef long long ll;
const int maxn=200000+10,p=100003;
int fac[maxn],inv[maxn];
int i,j,k,l,t,ans;
ll n,m,x,y;
int C(int n,int m){
if (n<m||m<0) return 0;
return (ll)fac[n]*inv[m]%p*inv[n-m]%p;
}
int work(int n,int m){
if (n>m) swap(n,m);
int i,r=0,t=1;
fo(i,0,n){
(r+=(ll)C(n,i)*C(m,i)%p*t%p)%=p;
t=(ll)t*2%p;
}
return r;
}
int main(){
freopen("move.in","r",stdin);freopen("move.out","w",stdout);
scanf("%lld%lld",&x,&y);
if ((x+y)%2){
printf("0\n");
return 0;
}
n=(x+y)/2;m=(x-y)/2;
if (n<0||m<0){
printf("0\n");
return 0;
}
fac[0]=1;
fo(i,1,p-1) fac[i]=(ll)fac[i-1]*i%p;
inv[p-1]=1;
fo(i,1,p-2) inv[p-1]=(ll)inv[p-1]*fac[p-1]%p;
fd(i,p-2,0) inv[i]=(ll)inv[i+1]*(i+1)%p;
ans=1;
while (n||m){
ans=(ll)ans*work(n%p,m%p)%p;
n/=p;m/=p;
}
(ans+=p)%=p;
printf("%d\n",ans);
}