#yuki1713 import math x,y=map(int,input().split()) print(math.factorial(x|y))