#codefestival2015okinawaf. [code_festival_2015_okinawa_f]Falconry

[code_festival_2015_okinawa_f]Falconry

Problem

Falconry is a kind of hunting using a bird of prey. One day, three falconers (the person who do falconry) decided to carry out the next competition.

There are NN checkpoints on a two-dimensional plane, the ithi_{th} checkpoint exists on the point of which the coordinate is (xi,yi)(x_i,y_i). The three falconers exist on the points of which the coordinates are (xa,ya)(x_a, y_a), (xb,yb)(x_b, y_b), (xc,yc)(x_c, y_c). Each one of them has one bird. In the beginning, every bird stays with its owner, thus the coordinate of it is the same as that of its owner.

When the competition begins, 33 birds will start to move. The purpose of this competition is to let all the checkpoints to be passed through by one bird at least, and to minimize the sum of the moving distance of the three birds. In this case, distance refers to the Euclidean Distance. The distance between two points (xs,ys)(x_s, y_s) and (xt,yt)(x_t, y_t) is sqrt(xsxt)2+(ysyt)2\\sqrt{(x_s - x_t)^2 + (y_s - y_t)^2}.

Checkpoints can be passed through in any order. For a bird, it is allowed to pass no checkpoint or pass all the checkpoints. Also, the same checkpoint can be passed through more than once. In addition, suppose that each bird can choose the optimal way to move.

The coordinates of all the checkpoints and the three falconers will be given. Please find the minimum value of the sum of the moving distance of three birds.


Input

Inputs will be given by standard input in following format

NN x1x_1 y1y_1 x2x_2 y2y_2 : xNx_N yNy_N xax_a yay_a xbx_b yby_b xcx_c ycy_c

  • For the first line, N(1N18)N (1 ≦ N ≦ 18) will be given.
  • From the second line, there are NN additional lines, for each line the coordinate of a checkpoint will be given. For the ithi_{th} line, integer xi(10,000xi10,000)x_i(-10,000≦x_i≦10,000), yi(10,000yi10,000)y_i(-10,000≦y_i≦10,000) will be given divided by a space.
  • For the (N+2)th(N+2)_{th} line, xa(10,000xa10,000)x_a(-10,000≦x_a≦10,000)ya(10,000ya10,000)y_a(-10,000≦y_a≦10,000) will be given divided by a space.
  • For the (N+3)th(N+3)_{th} line, xb(10,000xb10,000)x_b(-10,000≦x_b≦10,000)yb(10,000yb10,000)y_b(-10,000≦y_b≦10,000) will be given divided by a space.
  • For the (N+4)th(N+4)_{th} line xc(10,000xc10,000)x_c(-10,000≦x_c≦10,000)yc(10,000yc10,000)y_c(-10,000≦y_c≦10,000) will be given divided by a space.

In addition, all the coordinates are different from each other.

In other words, if ineqji \\neq j then (xi,yi)neq(xj,yj)(x_i, y_i) \\neq (x_j, y_j).

Also, for each i(1iN)i (1 ≦ i ≦ N), (xi,yi)neq(xa,ya)(x_i, y_i) \\neq (x_a, y_a), (xi,yi)neq(xb,yb)(x_i, y_i) \\neq (x_b, y_b) and (xi,yi)neq(xc,yc)(x_i, y_i) \\neq (x_c, y_c) will hold. Furthermore, (xa,ya)neq(xb,yb)(x_a, y_a) \\neq (x_b, y_b), (xb,yb)neq(xc,yc)(x_b, y_b) \\neq (x_c, y_c) and (xc,yc)neq(xa,ya)(x_c, y_c) \\neq (x_a, y_a) will hold.

Output

Output the minimum value of the sum of the moving distance of three birds when all the checkpoints have been passed through by at least one bird in one line.

The output is acceptable if absolute error or relative error is 10610^{-6} or less.

Print a newline at the end of output.


Input Example 1


3
1 1
102 98
197 -197
0 0
100 100
200 -200

Output Example 1


8.485281374239
  • If the bird that starts from (xa,ya)(x_a, y_a) passes through the first checkpoint, the moving distance will be sqrt2\\sqrt{2}.
  • If the bird that starts from (xb,yb)(x_b, y_b) passes through the second checkpoint, the moving distance will be 2sqrt22\\sqrt{2}.
  • If the bird that starts from (xc,yc)(x_c, y_c) passes through the third checkpoint, the moving distance will be 3sqrt23\\sqrt{2}.

Hence, by moving 6sqrt26\\sqrt{2}all the checkpoints will be passed through at least once.


Input Example 2


3
1 3
2 1
0 -2
0 0
-500 0
0 1000

Output Example 2


7.841619252964

If the bird that starts from (xa,ya)(x_a, y_a) passes the third checkpoint, then passes the second checkpoint, then passes the first checkpoint, the moving distance in total will be 2+sqrt13+sqrt52 + \\sqrt{13} + \\sqrt{5}.


Input Example 3


6
3 7
1 10
-2 -5
-3 4
0 2
6 6
-3 9
0 4
1 1

Output Example 3


22.585258012904