import math kabo,cha = input().split() print(math.factorial(int(kabo) | int(cha)))