Олимпиадный тренинг

Задача 23335. Monetary system (C, B')


Задача

Темы:
The non-British monetary system has evolved over the years, initially non-British people used level 0 pshillings - ordinary coins.
During the reign of  Henry the 1st, level 1 pshillings were introduced, which equaled 10 level 0 pshillings.
During the reign of  Henry the 2nd,  level 2 pshillings were introduced, which were equal to 20 level 1 pshillings.
During the reign of  Henry the 3rd, level 3 pshillings were introduced, which equaled 30 level 2 pshillings.
And so on, namely, during the reign of Henry the kth, pshillings of the kth level were introduced, which equaled 10k pshillings (k & minus; 1) of the level.
Now there is a huge amount in the treasury of Non-Britain, equal to n pshillings of the 0th level. Write it down with a phrase like "so many pshillings of such and such a level, so many pshillings of such and such a level
etc.", and the total number of pshillings of all levels you mentioned should be minimal.

Input data format
The first line contains a natural number n ( 1<= n <= 1015).
 
Output format
Print several pairs of integers, one per line. In this case, the pair (a, b) means the phrase
" a pshillings of the b-th level".
The level numbers in your phrase must be strictly decreasing. You can not use pshilings of a certain level at all, in this case you do not need to display anything about them. Number of pshillings
each level you mentioned should be positive (a > 0).
Enter Output
7777 1 3
8 2
17 1
70
6030 1 3
3 1