# BalancedFactorisation(R, UP)¶

balancedFactorisation(a, [b1, ..., bn]) returns a factorisation a = p1^e1 ... pm^em such that each pi is balanced with respect to [b1, ..., bm].
balancedFactorisation(a, b) returns a factorisation a = p1^e1 ... pm^em such that each pi is balanced with respect to b.