in reply to (ichimunki) Re x 2: RSA Factoring challenge
in thread RSA Factoring challenge

What I meant, which I suppose could have been stated more clearly, is that the golf works for any number which has exactly two primes as its factors, as is certainly* the case for the numbers given in the RSA challenge.

* For sufficiently high and practical values of certainty

Update: here's a recursive version that does what you're looking for at 52 chars:
  
sub f { my$n=my$p=pop;1while$n%--$p;$p>1?(f($n/$p),f($p)):$n }

   MeowChow                                   
               s aamecha.s a..a\u$&owag.print