trick, treat = map(int,input().split()) trick_or_treat = trick | treat n = 1 for i in range(1, trick_or_treat+1) : n *= i print(n)