Problem with decomposition of a number to mutually prime numbers.