def tt(num1,num2): import math num = num1 | num2 return math.factorial(num) a,b = map(int,input.split()) print(tt(a,b))