The closest in line with the given heights
n 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 dmin between two players with specific heights val1 and val2, as well as the positions k1min and k2min of these players in the line.
Input
You will receive input from the standard input device. The first line contains the space-separated integers n, val1, and val2. The second line contains the heights of all n players, listed from left to right, also separated by spaces. The constraints are 30 ≤ n ≤ 40, and each player's height is between 170 and 180 cm inclusive.
Output
Your output should be the minimum distance dmin between players with heights val1 and val2, followed by the positions k1min and k2min of these players in the line, all separated by spaces. It is guaranteed that there are players with heights val1 and val2 in the line.