finding largest prime factor of a number