Is there any polynomial algorithm to check if an integer is of the form $x=p^r q^s$, where $p$ and $q$ are primes?

119 Views Asked by At

It is well known and easy to design a polynomial algorithm to test whether $\omega(x)=1$ or $\omega(x)\neq 1$, where $\omega(\cdot)$ is the omega prime function, i.e. , $\omega(x)$ denotes the number of distinct prime factors of $x$. But I don't know of a polynomial algorithm for the test of $\omega(x)=2$. If someone can give me some reference in case there is a polynomial algorithm or in case it is conjectured or known that there is no polynomial algorithm.