At the 2023 Brazilian Summer Camp, prominent Polish coder kostka told his students how hashing is the best thing in the world. It makes problems related to strings that much easier! As such, an easy question related to strings must be made in order to show how efficient it is. The task is quite simple: you are given a string $$$s$$$ and an integer $$$k$$$. You only need to print out how many substrings $$$t$$$ exist, such that $$$(|t| * freq(t) = k)$$$, where $$$freq(t)$$$ is the amount of times the substring appears in the string. If at least one substring fits the criteria, you should print out the lexicographically smallest and the lexicographically largest (note that they may be the same). Quite an easy task, right?
Lexicographical order is defined as follows: when ordering two strings $$$a$$$ and $$$b$$$, $$$a$$$ is lexicographically smaller than $$$b$$$ if and only if one of the following holds:
The first line of the input contains two integers $$$n$$$ and $$$k$$$, $$$(1 \leq n \leq 10^6)$$$, $$$(1 \leq k \leq 10^{12})$$$ — the length of the string and the desired value.
The second line of the input will contain the string $$$s$$$, containing only lowercase Latin letters.
On the first line, output the amount of substrings that fit the criteria. Then, if substrings exist, print out the lexicographically smallest and then the lexicographically largest.
6 12aaaaaa
2 aaa aaaa
5 3zhdke
3 dke zhd
6 20kostka
0