Count number of triplets with product equal to given number

Count number of triplets with product equal to given number. Can anyone suggest better than O(n^2)