# Zju2599 Graduated Lexicographical Ordering

### 题目描述

Consider integer numbers from 1 to n. Let us call the sum of digits of an integer number its weight. Denote the weight of the number x as w(x). Now let us order the numbers using so called graduated lexicographical ordering, or shorter grlex ordering. Consider two integer numbers a and b. If w(a) < w(b) then a goes before b in grlex ordering. If w(a) = w(b) then a goes before b in grlex ordering if and only if the decimal representation of a is lexicographically smaller than the decimal representation of b. Let us consider some examples. 120 < grlex4 since w(120) = 1 + 2 + 0 = 3 < 4 = w(4). 555 < grlex78 since w(555) = 15 = w(78) and "555" is lexicographicaly smaller than "78". 20 < grlex200 since w(20) = 2 = w(200) and "20" is lexicographicaly smaller than "200". Given n and some integer number k, find the position of the number k in grlex ordering of integer numbers from 1 to n, and the k-th number in this ordering.

w(a)=w(b)，那么a 在b之前当且仅当a 的十进制表示在字典序中小于 b 的十进制表示。例

120 < grlex4 因为  w(120) = 1 + 2 + 0 = 3 < 4 = w(4)。
555 < grlex78 因为  w(555) = 15 = w(78) 并且  "555"  的字典序小于  "78"。
20 < grlex200 因为  w(20) = 2 = w(200) 并且  "20"  的字典序小于  "200"。

### 输入格式

There are several lines in the input file, and each line stands two integers n and k (1 <= k <= n <= 10^18).

### 输出格式

For each line in the input, output one line in the output file. First print the position of the number k in grlex ordering of integer numbers from 1 to n, and then the integer that occupies the k-th position in this ordering.

```20 10

```

```2 14
```