Solved problem 3 with naive method. Want to try fermat and pollard rho