This is a problem from some online competition, but it's over now so i would like to know how to actually solve it.

> 
> You are given number n and it has some (for number 4 you have 1,2,4) divisors (1 and itself included). If p is equal to product of all divisors of given number n find number of divisors of p.
> 
> 
> 

I tried to solve it but my solution was just optimized brute force so i am looking for fast solution with math background.