Note that both numbers you have found are powers of primes.
This is important, since every number is divisible by 1 and itself.
That leaves place for 3 divisors. Only one can be a prime, however.
Because if there were two different primes $x$ and $y$ ($x \ne y$) then
$xy$ is also a divisor, but not your number yet, since you need one more divisor.
Because your number has only two prime divisors
$xxy$ is a divisor
$xyy$ is also a divisor. $xxy \ne xyy$ because $x\ne y$, therefore neither of those can be your number.
That is at least 5+2=7 divisors.
Therefore, since $x \ne y$ and your number is bigger than $x$ or $y$, only one of those can be prime. This implies that only numbers that are in form $p^4$, where $p$ is a prime, have 5 divisors.
$p^4 < 100$ only for primes $p = 2,3$ as you have already found out.