We have $\prod_{d \mid n} d = \prod_{d \mid n} n/d$, so $n^6 = n^{\tau(n)}$, hence $\tau(n) = 6$. The numbers $n$ are thus $n=p^5$ or $n= pq^2$, with $p,q$ distinct primes.
EDIT. As pointed below, one is prone to have an oversight of the special $n=1$ case for which the arithmetic functions are defined by default
mavropnevma wrote:
We have $\prod_{d \mid n} d = \prod_{d \mid n} n/d$, so $n^6 = n^{\tau(n)}$, hence $\tau(n) = 6$. The numbers $n$ are thus $n=p^5$ or $n= pq^2$, with $p,q$ distinct primes.
You miss the case $n=1$.