Continued Fractions |

Let
*b*_{0}, *b*_{1}, *b*_{2},..., *b*_{n} be integers with *b*_{k} > 0 for *k* > 0. The *continued fraction* of order *n* with coeficients
*b*_{1}, *b*_{2},..., *b*_{n} and the initial term *b*_{0} is defined by
the following expression

An example of a continued fraction of order *n* = 3 is [2;3, 1, 4].
This is equivalent to

Write a program that determines the expansion of a given rational
number as a continued fraction. To ensure uniqueness, make
*b*_{n} > 1.

The input consists of an undetermined number of rational numbers. Each rational number is defined by two integers, numerator and denominator.

For each rational number given in the input, you should output the corresponding continued fraction.

43 19 1 2

[2;3,1,4] [0;2]

Fernando Silva, ACM-UP'2001