Problem A. Alternating digits

Author:A. Klenin   Time limit:2 sec
Input file:input.txt   Memory limit:64 Mb
Output file:output.txt  

Statement

Let us call a string of digits d1 d2… dk alternating string if the digits on even and odd positions form two disjoint sets.

For example, 121212 and 01234567 are alternating strings, while 11 and 5435 are not.

Your program must, given the string of digits, find its longest continuous alternating substring. If there is more than one longest substring, output the leftmost one.

Input file format

Input file contains single string of digits.

Output file format

Output file must contain integers P L — position and length of alternating substring.

Constraints

Input string consists of 1 to 30000 digits.

Sample tests

No. Input file (input.txt) Output file (output.txt)
1
7777
1 1
2
01234567802345
2 13

0.098s 0.031s 13