G Recurring Decimal
Description
As we all know, any scores are can be written in an
infinite recurring decimal or a finite decimal ,for
example,1/7 can be written in 0.(142857).(recurring
period is in the brackets).Now Give you a number x,
could you tell me the length of non-recurring period
and recurring period of 1/x
Input
There are multiple cases in the input.
In each case, there is a number x in a line(x is not
greater than 2e9)
when x == 0 means end.
Output