Rating:
TL;DR factorize n and calculate the desired number of pairs (similar to number of divisors)
I don't remember