#D4200. Chinol Choco

    ID: 3488 Type: Default 2000ms 268MiB

Chinol Choco

Chinol Choco

Problem

Chocolate company Chinor Choco has decided to build n new stores. For each store, ask each store manager to prepare two candidates for the place you want to build, and build it in either place.

Chinor Choco sells m types of chocolate, each manufactured at a different factory. All types of chocolate are sold at all stores. Chinor Choco owns only one truck to transport chocolate, and one truck can only carry one store's worth of chocolate. Therefore, trucks need to go around all factories when moving from one store to another.

Find the maximum travel distance when the stores are arranged so that the maximum minimum travel distance when moving from one store to another is the minimum.

There can be multiple stores and factories in the same location.

Constraints

The input satisfies the following conditions.

  • 2 ≤ n ≤ 200
  • 1 ≤ m ≤ 15
  • 0 ≤ ai, bi, ci, di, xi, yi ≤ 1000

Input

The input is given in the following format.

n m a0 b0 c0 d0 ... an−1 bn−1 cn−1 dn−1 x0 y0 ... xm−1 ym−1

All inputs are given as integers. On the first line, the number of Chinor chocolate shops n and the number of chocolate manufacturing factories m are given, separated by blanks. From the second line to the nth line, the coordinates (ai, bi), (ci, di) of the candidate places to build each store are given separated by blanks. 2 & plus; Factory coordinates (xi, yi) are given from the nth line to the mth line, separated by blanks.

Output

Output the maximum travel distance when the store is arranged so that the maximum of the minimum travel distance is minimized. The error should not exceed 10-6.

Examples

Input

2 1 0 0 5 5 3 3 6 6 2 2

Output

4.2426406871

Input

2 2 0 0 6 0 7 0 3 0 4 0 5 0

Output

3.0000000000

inputFormat

input satisfies the following conditions.

  • 2 ≤ n ≤ 200
  • 1 ≤ m ≤ 15
  • 0 ≤ ai, bi, ci, di, xi, yi ≤ 1000

Input

The input is given in the following format.

n m a0 b0 c0 d0 ... an−1 bn−1 cn−1 dn−1 x0 y0 ... xm−1 ym−1

All inputs are given as integers. On the first line, the number of Chinor chocolate shops n and the number of chocolate manufacturing factories m are given, separated by blanks. From the second line to the nth line, the coordinates (ai, bi), (ci, di) of the candidate places to build each store are given separated by blanks. 2 & plus; Factory coordinates (xi, yi) are given from the nth line to the mth line, separated by blanks.

outputFormat

Output

Output the maximum travel distance when the store is arranged so that the maximum of the minimum travel distance is minimized. The error should not exceed 10-6.

Examples

Input

2 1 0 0 5 5 3 3 6 6 2 2

Output

4.2426406871

Input

2 2 0 0 6 0 7 0 3 0 4 0 5 0

Output

3.0000000000

样例

2 2
0 0 6 0
7 0 3 0
4 0
5 0
3.0000000000