代码:

//CodeForces - 822A I'm bored with life
#include<bits/stdc++.h>
using namespace std;

int main()
{
    int m,n;
    scanf("%d%d",&n,&m);
    if(n>m)
    {
        int t=n;
        n=m;
        m=t;
    }
    long long int ans=1;
    for(int i=1;i<=n;i++)
    {
        ans*=(long long int)i;
    }
    printf("%lld",ans);
}