fixed random number factorization