import math a, b = map(int, input().split()) c = a | b d = math.factorial(c) print(d)