360
2^3 3^2 5^1
For p from 2..sqrt(n): count exponent while n%p==0. Print if exponent>0. If remaining>1 print remaining^1.