#D12906. A Polygon And Circles

    ID: 10731 Type: Default 2000ms 536MiB

A Polygon And Circles

A Polygon And Circles

Problem

Given a convex polygon consisting of N N vertices and the center coordinates of M M circles. The radius of all circles is r r .

I want to find the minimum real number r r that satisfies the following conditions.

Condition: Every point inside a convex polygon is contained in at least one circle.

Constraints

The input satisfies the following conditions.

  • 3 leN le100 3 \ le N \ le 100
  • 1 leM le100 1 \ le M \ le 100
  • 105 lepxi,pyi le105 -10 ^ 5 \ le px_i, py_i \ le 10 ^ 5
  • 105 lecxi,cyi le105 -10 ^ 5 \ le cx_i, cy_i \ le 10 ^ 5
  • No matter which of the three vertices of the convex polygon is selected, they do not exist on the same straight line.

Input

All inputs are given as integers in the following format:

N N px1 px_1 py1 py_1 px2 px_2 py2 py_2 :: pxN px_N pyN py_N M M Cx1 Cx_1 cy1 cy_1 cx2 cx_2 cy2 cy_2 :: CxM Cx_M cyM cy_M

The 1 1 line is given an integer N N that represents the number of vertices of the convex polygon. Information on each vertex of the convex polygon is given in the counterclockwise order from the 2 2 line to the 2+N1 2 + N-1 line. The 1+i 1 + i line is given pxi px_i pyi py_i , which represents the coordinates of the i i th vertex, separated by blanks. The 2+N 2 + N line is given the integer M M , which represents the number of circles. Information on the center coordinates of the circle is given from the 2+N+1 2 + N + 1 line to the 2+N+M 2 + N + M line. On the 2+N+i 2 + N + i line, cxi cx_i cyi cy_i representing the center coordinates of the i i th circle is given, separated by blanks.

Output

Outputs the radius r r of the smallest circle that satisfies the condition. However, absolute or relative errors up to 105 10 ^ {-5} are acceptable.

Examples

Input

4 2 3 1 2 2 1 3 2 4 1 3 1 1 3 3 3 1

Output

1.414213562373

Input

7 -96469 25422 -55204 -45592 -29140 -72981 98837 -86795 92303 63297 19059 96012 -67980 70342 17 -4265 -14331 33561 72343 52055 98952 -71189 60872 10459 -7512 -11981 57756 -78228 -28044 37397 -69980 -27527 -51966 22661 -16694 13759 -59976 86539 -47703 17098 31709 -62497 -70998 -57608 59799 -1904 -35574 -73860 121

Output

75307.220122044484

inputFormat

input satisfies the following conditions.

  • 3 leN le100 3 \ le N \ le 100
  • 1 leM le100 1 \ le M \ le 100
  • 105 lepxi,pyi le105 -10 ^ 5 \ le px_i, py_i \ le 10 ^ 5
  • 105 lecxi,cyi le105 -10 ^ 5 \ le cx_i, cy_i \ le 10 ^ 5
  • No matter which of the three vertices of the convex polygon is selected, they do not exist on the same straight line.

Input

All inputs are given as integers in the following format:

N N px1 px_1 py1 py_1 px2 px_2 py2 py_2 :: pxN px_N pyN py_N M M Cx1 Cx_1 cy1 cy_1 cx2 cx_2 cy2 cy_2 :: CxM Cx_M cyM cy_M

The 1 1 line is given an integer N N that represents the number of vertices of the convex polygon. Information on each vertex of the convex polygon is given in the counterclockwise order from the 2 2 line to the 2+N1 2 + N-1 line. The 1+i 1 + i line is given pxi px_i pyi py_i , which represents the coordinates of the i i th vertex, separated by blanks. The 2+N 2 + N line is given the integer M M , which represents the number of circles. Information on the center coordinates of the circle is given from the 2+N+1 2 + N + 1 line to the 2+N+M 2 + N + M line. On the 2+N+i 2 + N + i line, cxi cx_i cyi cy_i representing the center coordinates of the i i th circle is given, separated by blanks.

outputFormat

Output

Outputs the radius r r of the smallest circle that satisfies the condition. However, absolute or relative errors up to 105 10 ^ {-5} are acceptable.

Examples

Input

4 2 3 1 2 2 1 3 2 4 1 3 1 1 3 3 3 1

Output

1.414213562373

Input

7 -96469 25422 -55204 -45592 -29140 -72981 98837 -86795 92303 63297 19059 96012 -67980 70342 17 -4265 -14331 33561 72343 52055 98952 -71189 60872 10459 -7512 -11981 57756 -78228 -28044 37397 -69980 -27527 -51966 22661 -16694 13759 -59976 86539 -47703 17098 31709 -62497 -70998 -57608 59799 -1904 -35574 -73860 121

Output

75307.220122044484

样例

4
2 3
1 2
2 1
3 2
4
1 3
1 1
3 3
3 1
1.414213562373