Given a positive integer , find its largest prime factor. For example, if , the prime factors are , and the largest is .
This problem appears in Project Euler and tests your understanding of prime factorization. You will apply the trial division method you learned earlier.