$x,y\in \mathbb Z^+$ Show that $P(x)=P(y) \implies x=y$ 
Let $x,y\in \mathbb Z^+$, we define $P(a)$ as the product of all the divisors of $a$ including $1$ And $a$, Show that $$P(x)=P(y)\implies x=y.$$

Im gonna show my Attempt, which is based on cases.
Case 1: if  $x,y$ Are primes.
$$x,y\in \mathbb P\implies \cases{P(x)=x\\P(y)=y}\implies (P(x)=P(y) \iff x=y)$$
Where $\mathbb P$ Is the set of prime numbers.
Case 2: if $x,y$ are some powers of prime.
$$\cases{x=p^n\\ y=q^m } \implies \cases{P(x)=1\cdot p\cdot p^2...p^n=p^{\frac{n(n+1)}{2}}\\P(y)= 1\cdot q\cdot q^2...q^m= q^{\frac{m(m+1)}{2}}} $$ So to prove the statement We set $$p^{\frac{n(n+1)}{2}} =q^{\frac{m(m+1)}{2}}$$
The next step is to show that this statement implies $x=y$, I have no idea how to do that. (By the way the next case is to consider $x,y$ As a product of primes.)

Recall that if $ N = \prod p_i ^ {a_i}$ is the prime factorization of $N$, then $N$ has $\tau(N) = \prod (a_i + 1)$ factors, and $P(N) = N^{\tau(N)/2 } $ (by pairing up the factor $d$ with $N/d$).
Let $M = \prod p_i ^{b_i}$ (with the same ordering of primes, and finitely many exponents are non-zero).
Suppose that $P(N) = P(M)$.
Then $N^{\prod(a_i + 1) } = M^{\prod (b_i + 1) }$.
Considering prime $p_k$, this gives us $ a_k \prod(a_i + 1 ) = b_k \prod(b_i + 1)$ for all $k$.
Hence $a_k / b_k$ is the constant $\prod (b_i+1)/(a_i+1)$.
If $a_k / b_k < 1$, then clearly $a_k \prod (a_i + 1) < b_k \prod (b_i + 1)$, which is a contradiction. Likewise for $a_k / b_k  >1$.
Hence, $a_k / b_k = 1$ and so $N = M$.
