I find the best approach for these problems, when confused, is to work with smaller examples. Suppose $a$ and $b$ each have 1 prime factor (ie, they are prime). Then how many factors does $ab$ have? Well, since they are distinct, we know $1$, $a$, $b$, and $ab$ all divide $ab$ evenly. And in fact, nothing more can possible divide $ab$.
So the answer above is $(1+1)(1+1)$ as expected.
Now just increase the number of factors and the number of integers to match your question. If you get lost on the way, post in the comments and we'll help you out!
Addendum: You have to be careful when the number of prime factors (5 in your problem above) is not itself prime: then things don't work out as cleanly. The fact that your problem stipulates that each natural number has 5 prime factors immediately implies each number is $p^4$ for some prime $p$. That's a crucial point.