RSA solving for $p$ and $q$ knowing $\phi(pq)$

I am trying to find primes $p$ and $q$ in the RSA algorithm given $n = pq$ and the value of $\phi(n)$. I know the following: $\phi(n) = (p-1)(q-1) = pq - p - q + 1$ Solving for $p+q = pq - \phi(n)...