Common Factors
시간 제한1초메모리 제한1024 MB
2 ≤ k ≤ n인 k 중에서 [1, k]의 정수 가운데 k와 1보다 큰 공약수를 가지는 비율이 가장 큰 k를 찾아 기약분수로 출력한다.
문제
Everyone likes to share things in common with other people.
Numbers are the same way! Numbers like it when they have a factor in common.
For example, and share a common factor of , which gives them something to talk about.
For a given integer , we define a function, , equal to the number of integers in the range [, ] that share a common factor greater than with .
Furthermore, we can define a second function, , which characterizes the fraction of numbers that like a given number as follows: .
What we really want to know though, is, for any integer , what is the maximum value of ?
입력
The input consists of a single integer (), the value of for the input case.
출력
For the provided test case, output the result as a fraction, in lowest terms, in the form / where the greatest common divisor of and is 1.