Codeforces Round 385 (Div. 1)
D
Hongcow Draws a Circle
Codeforces
3200
原题
← CE →
翻译中…

Hongcow really likes the color red. Hongcow doesn't like the color blue.

翻译中…

Hongcow is standing in an infinite field where there are $*n*$ red points and $*m*$ blue points.

翻译中…

Hongcow wants to draw a circle in the field such that this circle contains at least one red point, and no blue points. Points that line exactly on the boundary of the circle can be counted as either inside or outside.

翻译中…

Compute the radius of the largest circle that satisfies this condition. If this circle can have arbitrarily large size, print $- 1$. Otherwise, your answer will be accepted if it has relative or absolute error at most $10^{ - 4}$.

翻译中…

Input

翻译中…

The first line of the input will contain two integers $*n*, *m*$ ($1 ≤ *n*, *m* ≤ 1, 000$).

翻译中…

The next $*n*$ lines will contain two integers $*x*_{*i*}, *y*_{*i*}$ ($1 ≤ *x*_{*i*}, *y*_{*i*} ≤ 10^{4}$). This denotes the coordinates of a red point.

翻译中…

The next $*m*$ lines will contain two integers $*x*_{*i*}, *y*_{*i*}$ ($1 ≤ *x*_{*i*}, *y*_{*i*} ≤ 10^{4}$). This denotes the coordinates of a blue point.

翻译中…

No two points will have the same coordinates.

翻译中…

Output

翻译中…

Print $- 1$ if the circle can have arbitrary size. Otherwise, print a floating point number representing the largest radius circle that satisfies the conditions. Your answer will be considered correct if its absolute or relative error does not exceed $10^{ - 4}$.

翻译中…

Namely, let's assume that your answer is $*a*$ and the answer of the jury is $*b*$. The checker program will consider your answer correct if image.

翻译中…

Note

翻译中…

This is a picture of the first sample

翻译中…

image

翻译中…

This is a picture of the second sample

翻译中…

image

翻译中…

样例

Input #1
2 5
2 3
3 4
1 1
1 4
4 2
4 7
2 5
Output #1
3.5355338827
InputCopy OutputCopy
Input #2
1 6
3 3
1 5
5 4
2 1
3 4
4 2
1 3
Output #2
1.5811388195
InputCopy OutputCopy
Input #3
2 2
2 2
3 3
1 1
4 4
Output #3
-1
InputCopy OutputCopy
题目信息
题号
744D
时间限制
6 s
内存限制
256 MB
标签
计算几何

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。