The Flight Way#2152

The Flight Way

1 second
64 megabytes
Medium

Club of obsolete vehicles decided to celebrate the May th, with great flights of copies of ancient airplanes. Club members have built aerodromes (2 \leq N \leq 1000) in various locations on the Earth's surface and prepared planes. However, suddenly an amendment to the ecological tax law was introduced, and the club must hold the celebration in a shortened format. Two aerodromes were selected, and only one plane will fly between them using the shortest possible route! The maximum distance the plane can fly without landing is km, so if necessary, it can use intermediate aerodromes.

Help the club find the shortest route, considering the Earth as an exact sphere with equator length exactly km, ignoring the effect of flying height on the distance.

Input

The first line contains — the maximum direct flight distance (in kilometers, 10 \leq R \leq 50000). The second line contains the number of aerodromes . The next lines contain the geographic coordinates of the aerodromes. The coordinate format is: first latitude (uppercase letter or — North or South, then degrees, minutes, and seconds), then longitude (similar, but using the letter or — East or West), all numbers and letters separated by a single space. Degrees and minutes are integers, seconds can have decimal fractions. The last line contains two integers indicating the aerodromes selected as start and finish (-based, i.e., numbering starts from ).

Output

Your program should output three lines. The st line should contain one floating-point number — the minimal possible length of the route from start to finish, in kilometers, with accuracy up to meters. The nd line should contain exactly one integer — the number of intermediate aerodromes on the route. The rd line should contain the list of these intermediate aerodromes in order from start to finish. If there are multiple correct solutions, your program may output any of them. If the plane can fly from start to finish without landings, the nd line should contain and the rd line should be empty. If the plane cannot reach finish from start, the st line must contain , the nd — , and the rd must be empty.

Examples

Example 1

Loading
Loading