Solve for q q+r+s=p