Fractions to Decimals#1030

Fractions to Decimals

1 second
64 megabytes
Very easy

Write a program that will read a fraction in the form , where is the numerator and is the denominator, and output its decimal representation. If the decimal representation has a repeating sequence of digits, enclose that sequence in parentheses. For example, 1/3 = 0.(3), and 41/333 = 0.(123). Use the format to denote an integer. Typical examples are shown below:

1/3     =  0.(3)
22/5    =  4.4
1/7     =  0.(142857)
2/2     =  1.0
3/8     =  0.375
45/56   =  0.803(571428)

Input

A single line contains two space-separated integers, and , where 1 \leq N, D \leq 100000.

Output

The decimal representation, as described above. If the expansion exceeds characters in length, print it on multiple lines with characters per line.

Examples

Example 1

Loading
Loading