math.factorial is in Python 2.6+