시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
2 초 256 MB 76 32 28 40.580%

문제

Cube World에서는 모든 유리수를 소수로 표시하고, Baekjoon World에서는 모든 유리수를 분수로 표시합니다. 이 때문에 두 나라 간에 오랜 기간 동안 전쟁을 치뤘고, 마침내 서로의 생각을 존중하기로 화해했습니다.

그런데 문제는 Cube World에서 사용하는 소수가 너무 많아서, 이를 모두 Baekjoon World에서 사용하는 분수로 바꾸기는 어렵다는 것이었습니다. 한참을 고민 한 두 나라는 결국 위대한 과학자인 당신에게 도움을 요청해 왔습니다.

Cube World에서는 순환소수를 표시할 때 순환하는 부분을 소괄호로 묶어서 표시합니다. 예를 들어 0.444...는 0.(4)로 표시하는 식입니다. Baekjoon World에서는 분수를 표시할 때 분자와 분모가 서로소가 되도록 하여 표시합니다.

입력

첫 줄에 Cube World에서 사용하는 길이가 10 이하인 소수 하나가 주어집니다. 이 소수는 소수점과 소수 부분이 없을 수도 있고, 순환하는 부분이 없을 수도 있습니다.

출력

첫 줄에 Baekjoon World에서 사용하는 분수로 출력합니다.

예제 입력 1

2015

예제 출력 1

2015/1

예제 입력 2

0.(4)

예제 출력 2

4/9

예제 입력 3

3.(142857)

예제 출력 3

22/7

예제 입력 4

9.(9)

예제 출력 4

10/1

힌트

W3sicHJvYmxlbV9pZCI6IjExMDgyIiwicHJvYmxlbV9sYW5nIjoiMCIsInRpdGxlIjoiXHVjMThjXHVjMjE4XHViOTdjIFx1YmQ4NFx1YzIxOFx1Yjg1YyIsImRlc2NyaXB0aW9uIjoiPHA+Q3ViZSBXb3JsZFx1YzVkMFx1YzExY1x1YjI5NCBcdWJhYThcdWI0ZTAgXHVjNzIwXHViOWFjXHVjMjE4XHViOTdjIFx1YzE4Y1x1YzIxOFx1Yjg1YyBcdWQ0NWNcdWMyZGNcdWQ1NThcdWFjZTAsIEJhZWtqb29uIFdvcmxkXHVjNWQwXHVjMTFjXHViMjk0IFx1YmFhOFx1YjRlMCBcdWM3MjBcdWI5YW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