solve N=c/(P^3) and N=d/P for N and P