The closest in line with the given heights#8270

The closest in line with the given heights

0.3 seconds
64 megabytes
Easy

volleyball players are standing in a line, but not necessarily in order of their heights. The distance between any two players is defined as the number of players standing between them. Mykhailo is interested in finding the minimum distance d_{min} between two players with specific heights val_1 and val_2, as well as the positions k_{1min} and k_{2min} of these players in the line.

Input

You will receive input from the standard input device. The first line contains the space-separated integers , val_1, and val_2. The second line contains the heights of all players, listed from left to right, also separated by spaces. The constraints are 30 \leq n \leq 40, and each player's height is between and cm inclusive.

Output

Your output should be the minimum distance d_{min} between players with heights val_1 and val_2, followed by the positions k_{1min} and k_{2min} of these players in the line, all separated by spaces. It is guaranteed that there are players with heights val_1 and val_2 in the line.

Examples

Example 1

Loading
Loading