Frogs With Styles

No attempts yetTime limit1sMemory limit256 MB

Problem

The yearly pond crossing competition scores frogs on speed and on style. A frog crosses a pond by jumping from lily pad to lily pad. One jump takes the same time however far it goes, so speed means using as few jumps as possible. Style comes from jumping far. Nothing looks worse than a trained competition frog taking a short hop, so among the routes with the fewest jumps the judges prefer the one whose shortest jump is as long as possible.

Freddo, last year's champion, wants a program that reads a lily pad map and the frog's maximum jump range, then reports how good the best route is.

A route is better when it uses fewer jumps. Every 3 jump route beats every 4 jump route. When several routes tie for the fewest jumps, the best one is the route with the longest shortest jump.

The picture shows the layout of the first example. Pad 0 is the start and pad 1 is the finish. The route 0, 2, 3, 1 uses the fewest jumps, but the jump from pad 2 to pad 3 is very short. The best route for this layout is 0, 4, 7, 1.

Input

The input holds several ponds. The first line of each pond holds two integers PP and DD, the number of lily pads and the longest jump the frog can make. The next PP lines hold two floating point numbers XX and YY each, the coordinates of the centre of one pad, given in pad number order starting at pad 0. Every jump goes from centre to centre, and a frog that launches or lands off centre is disqualified at once.

In each pond, pad 0 is the start and pad 1 is the finish.

A jump is legal when the distance between the two pad centres is at most DD. A jump of exactly DD is legal.

A line holding 0 0 in place of PP and DD ends the input. That line is not a pond.

Constraints

  • 2P2002 \le P \le 200
  • 0<D<10000 < D < 1000
  • 0<X<10000 < X < 1000, 0<Y<10000 < Y < 1000
  • The input holds at most 20 ponds.
  • Pad 1 is always reachable from pad 0 using legal jumps.

Output

For each pond, print one line with the number of jumps on the best route and the length of the shortest jump on that route, separated by a single space. Round the length to exactly one decimal place.

Several routes can be equally good, but the two numbers are the same for all of them, so the answer is unique. No input has an optimal length that sits on a rounding boundary.