Solved problem 69 with the help of Quinny's PrimeSieve class