#C204. Largest Prime Factor

    ID: 45312 Type: Default 1000ms 256MiB

Largest Prime Factor

Largest Prime Factor

You are given a positive integer \( n \). Your task is to compute its largest prime factor. In other words, you need to find the largest prime number that divides \( n \) without leaving a remainder. If \( n \) is a prime number, then the answer is \( n \) itself.

For instance, if \( n = 15 \), the prime factors are \( 3 \) and \( 5 \), and hence the answer is \( 5 \). Similarly, for \( n = 1024 \), even though \( 1024 = 2^{10} \), the only prime factor is \( 2 \).

Your solution should read the input from standard input (stdin) and output the result to standard output (stdout).

inputFormat

The input consists of a single line containing one integer \( n \) (\( 1 \leq n \leq 10^{15} \)).

outputFormat

Output a single integer which is the largest prime factor of \( n \).

## sample
15
5