Refrain (Easy)#2320

Refrain (Easy)

1 second
64 megabytes
Medium

Consider a sequence of integers from to . A subsequence of consecutive elements is called a refrain if the product of its length and the number of its occurrences in the sequence is maximized.

Find the refrain for the given sequence.

Input

The first line contains two integers: and (1 \leq n \leq 150, 1 \leq m \leq 10).

The second line contains integers from to .

Output

The first line should contain the product of the length of the refrain and the number of its occurrences. The second line should contain the length of the refrain. The third line should contain the refrain sequence.

Examples

Example 1

Loading
Loading