import math as m x, y = map(int, input().split()) z = x | y print(m.factorial(z))