Twirling Towards Freedom (Small)

Each minute you may stay put or rotate 90 degrees clockwise around one of the stars to maximize the distance from the origin after M minutes.

Medium4Brute forceGeometryBFSNo attempts yetTime limit5sMemory limit512 MB

Problem

"I say we must move forward, not backward; upward, not forward; and always twirling, twirling, twirling towards freedom!"

Kodos, a former candidate for President of the United States.

Kodos comes from the planet Rigel VII. The speech worked on you, so you have decided to twirl toward freedom as well. In this problem, freedom means getting as far from your starting point as you can.

The galaxy is a two-dimensional plane. Your ship starts at the origin (0,0)(0, 0), and the galaxy has NN stars. Every minute you may pick one star and rotate your ship 90 degrees clockwise around that star. You may also stay where you are for that minute.

How far from the origin can the ship be after MM minutes?

The picture shows the first three rotations of one possible path for the first example. That path is not part of an optimal plan.

Input

The first line has one integer TT, the number of test cases. Each test case begins with a line holding NN and a line holding MM. The next NN lines each hold two integers XiX_i and YiY_i, the position of the ii-th star.

Limits

  • 1T1001 \le T \le 100
  • 1N101 \le N \le 10
  • 1M101 \le M \le 10
  • 1000Xi1000-1000 \le X_i \le 1000
  • 1000Yi1000-1000 \le Y_i \le 1000
  • No two stars are at the same position.
  • A star may be at the origin.

Output

For each test case, print one line of the form Case #x: D, where xx is the test case number starting from 1 and DD is the distance from the origin to the best final position. Print DD rounded to exactly six digits after the decimal point.