Aroma Ring Snapshot
An artisan keeps vials on a circular shelf, in positions clockwise. After position comes position again. The vial at position has quantity and aroma code .
A snapshot is described by a starting position and a length , where and . It contains the distinct positions reached by starting at and moving clockwise. More precisely, its -th position is
for .
The snapshot has total quantity
and aroma span
A snapshot is successful if and .
Choose a successful snapshot with the smallest possible length . If several successful snapshots have this same smallest , choose the one with the smallest starting position .
Input
The first line contains three integers , , and (, , ), the number of vials, the required total quantity, and the maximum allowed aroma span. The next lines describe the vials in order from position to position . The -th of these lines contains two integers and (, ), the quantity and aroma code of the vial at position . All integers on the same line are separated by spaces.
Output
If no successful snapshot exists, print one line containing the single integer . Otherwise, print one line containing three integers , , and , separated by spaces. Here is the chosen length, is the chosen starting position, and is the ending position:
Samples
Sample 1
Input
5 8 3 2 5 5 6 3 8 4 4 2 7
Output
2 2 3
The output selects the snapshot containing positions and . Its total quantity is and its aroma span is .
Sample 2
Input
4 9 2 4 10 2 8 4 6 5 9
Output
2 4 1
The output selects positions and , in that order. The snapshot wraps around the shelf, has total quantity , and has aroma span .