#C205. Largest Prime Factor

    ID: 45323 Type: Default 1000ms 256MiB

Largest Prime Factor

Largest Prime Factor

Given a positive integer ( n ), your task is to find its largest prime factor. A prime factor is any factor of ( n ) that is a prime number. For example, if ( n = 10 ), the prime factors are (2) and (5), and the largest among them is (5). The input will be read from standard input, and the output should be written to standard output.

inputFormat

Input consists of a single line containing a single integer ( n ) (( n \ge 2 )).

outputFormat

Output a single integer representing the largest prime factor of ( n ) on a new line.## sample

10
5

</p>