Cornering at Poles

No attempts yetTime limit3sMemory limit256 MB

Problem

You are competing in a robot contest. The contest gives you a disc shaped robot placed on a flat field, and several poles stand on that field. The robot moves in any direction but cannot pass through a pole. It can turn around a pole while touching it.

Find the length of the shortest path the robot takes to reach the goal. The length of the path is the distance travelled by the center of the robot. The radius of the robot is 100100 and the thickness of a pole is ignored, so the center of the robot always stays at distance 100100 or more from every pole. A position where that distance is exactly 100100 is allowed. When two poles are closer to each other than the diameter of the robot, the robot cannot pass between them.

Input

The input is a single test case.

N Gx Gy
x1 y1
...
xN yN

The first line has three integers. NN is the number of poles, with 1N81 \le N \le 8. (Gx,Gy)(G_x, G_y) is the goal position. The robot starts with its center at (0,0)(0, 0) and finishes when its center reaches (Gx,Gy)(G_x, G_y). The starting position and the goal position are different.

Each of the next NN lines has two integers. (xi,yi)(x_i, y_i) is the position of the ii-th pole. Every coordinate satisfies 1000Gx,Gy,xi,yi1000-1000 \le G_x, G_y, x_i, y_i \le 1000. No pole stands within distance 100.01100.01 of the starting position or of the goal position. For the distance di,jd_{i,j} between the ii-th pole and the jj-th pole with iji \ne j, either 1di,j<199.991 \le d_{i,j} < 199.99 or 200.01<di,j200.01 < d_{i,j} holds.

Output

Print the length of the shortest path to the goal on one line, rounded to exactly five digits after the decimal point. If the robot cannot reach the goal, print 0.00000.