By Alexandre Campos, UNIUBE Brazil
You are about to write a program to predict a CPF, which, in Brazil, is equivalent to Social Security Number. It is composed by 11 digits and the lasts two (verification digits) are function of the nine previous. In this way, if a person informs a CPF, by mistake or on purpose, it is possible to find out. Let us introduce some notation. Let a CPF be
a1 a2 a3 . a4 a5 a6 . a7 a8 a9 - b1 b2
To get b1, one can multiply a1 by 1, a2 by 2, a3 by 3, so on, up to a9 by 9 and sum these results. Then, b1 is the remaining of this number when divided by 11, or 0 in case the remaining is 10.
Analogously, to get b2, one can multiply a1 by 9, a2 by 8, a3 by 7, so on, up to a9 by 1 and sum these results. Then, b2 is the remaining of this number when divided by 11, or 0 in case the remaining is 10.
The input is composed by an unknown number of sequences in the form:
Each sequence represents the 9 firsts digits of a CPF.
For each sequence, you have to print the input sequence and the verification digits formated as
|Input Sample||Output Sample|