An unfamiliar emotion arises. Will you scold me for this?
Yuki has her own aesthetic for numbers.
Yuki considers a positive integer $x$ to be "kawaii" if and only if the product of the digits of $x$ in its decimal representation is no greater than $k$.
For example, when $k=11$, $521$ is kawaii because $5\times2\times1=10 < 11$, while $314$ is not kawaii because $3\times1\times4=12 > 11$.
Now Yuki has $n$ positive integers $a_1, \dots, a_n$, where $1 \le a_i \le 10^{10^5}$. You need to determine whether each of them is kawaii. Note that $10^{10^5} = 10^{100000}$.
Although $a_i$ can be extremely large, Yuki believes that this will not be a problem for someone as clever as you!
Input
The first line contains two positive integers $n$ and $k$.
The next $n$ lines each contain a positive integer $a_i$.
Output
Output $n$ lines, where the $i$-th line contains a string:
- If $a_i$ is kawaii, output
kawaii. - If $a_i$ is not kawaii, output
dame.
Examples
Input 1
4 8 15 24 37 80
Output 1
kawaii kawaii dame kawaii
Note
In this example, $n=4$ and $k=8$.
- $15$ is kawaii because $1\times5=5 < 8$.
- $24$ is kawaii because $2\times4=8 = 8$.
- $37$ is not kawaii because $3\times7=21 > 8$.
- $80$ is kawaii because $8\times0=0 < 8$.
Input 2
3 998244353 31415926535 9999999999 17320508075
Output 2
kawaii dame kawaii
Note
In this example, $n=3$ and $k=998244353$.
- $31415926535$ is kawaii because the product of its digits in decimal representation is $486000$, which is less than $998244353$.
- $9999999999$ is not kawaii because the product of its digits in decimal representation is $3486784401$, which is greater than $998244353$.
- $17320508075$ is kawaii because the product of its digits in decimal representation is $0$, which is less than $998244353$.
Input 3
(See problem attachments)
Output 3
(See problem attachments)
Note
This sample satisfies the constraints for test case 4.
Input 4
(See problem attachments)
Output 4
(See problem attachments)
Note
This sample satisfies the constraints for test case 7.
Input 5
(See problem attachments)
Output 5
(See problem attachments)
Note
This sample satisfies the constraints for test case 10.
Constraints
For all test data:
- $1 \le n \le 20$
- $1 \le k \le 10^9$
- $1 \le a_i \le 10^{10^5}$
| Test Case ID | $a_i \le$ | $k \le$ | Special Property |
|---|---|---|---|
| $1$ | $9$ | $9$ | Yes |
| $2\sim3$ | $10^9$ | $10^9$ | Yes |
| $4\sim6$ | $10^9$ | $10^9$ | No |
| $7$ | $10^{18}$ | $10^9$ | Yes |
| $8$ | $10^{18}$ | $10^9$ | No |
| $9$ | $10^{10^5}$ | $10^9$ | Yes |
| $10$ | $10^{10^5}$ | $10^9$ | No |
Special Property: $a_i$ is guaranteed not to contain the digit $0$ in its decimal representation.