#include<cstdio>
//-----------------------------------------------------------------------
int n,m;
int i,j,k;
long long l;
int r[2333333];
int s[23333],c[233333];
//-----------------------------------------------------------------------
inline void work (int d) { for (k=1; d>1; k++) while (d>1&&!(d%s[k])) { d/=s[k]; c[k]+=j; } }
//-----------------------------------------------------------------------
int main ( )
{
freopen ( "tiao.in" , "r" , stdin );
freopen ( "tiao.out" , "w" , stdout );
scanf("%d%d",&n,&m); if (n<m) n^=m,m^=n,n^=m;
//--
for (i=2; i<=n+m-2; i++)
{
if (!c[i]) s[++s[0]]=i;
for (j=1; j<=s[0]&&i*s[j]<=n+m-2; j++)
{
c[i*s[j]]=1;
if (i%s[j]==0) break;
}
}
//--
for (i=1; i<=s[0]; i++) c[i]=0;
for (i=n,j=0+1; i<=n+m-2; i++) work(i);
for (i=2,j=0-1; i<=0+m-1; i++) work(i);
//--
r[r[0]=1]=1;
for (i=1,k=0+0; i<= s[0]; i++) if (c[i]--)
{
for (l=s[i]; c[i]; c[i]--) l*=s[i];
for (j=1; j<=r[0]; r[j++]=k%10) k=(k/10)+r[j]*l;
while (k/=10) r[++r[0]]=k%10;
}
for (i=r[0]; i; i--) printf("%d",r[i]);
}