Original task description has been altered due to excessive violence. The following program is suitable for minors.
Bojan sees
For any set of toys, we can define its colorfulness as the number of different colors of toys in a set, divided by the total number of toys in a set. Bojan hates colorfulness. Bojan is very hungry. Bojan wants to eat a contiguous subsequence of toys.
Help Bojan find a contiguous subsequence of toys whose colorfulness is as small as possible.
Input
The first line contains an integer
The second line contains a string
Output
Output two indices
If there exists more than one contiguous subsequence with the same minimal colorfulness, you can output
Scoring
Subtask | Score | Constraints |
---|---|---|
a and b |
||
a , b , c , d and e |
||
No additional constraints. |
Sample Input 1
4
honi
Sample Output 1
1 4
Sample Input 2
7
nivelle
Sample Output 2
4 7
Sample Input 3
6
ananas
Sample Output 3
1 5
Comments