#000038

tacke

You are given two disjoint sets of dots with their coordinates in the Cartesian coordinate system, one set of red dots and one set of blue dots. You need to calculate the maximum distance between two dots (one red and one blue ).


InputIn the first line of the standard input you are given one positive integer N (1 <= N <= 100000) that represents the number of red dots. In the following N lines you are given two integers divided by a space that represent the coordinates of the i-th ( 1 <= i <= N ) red dot. Then you are given one positive integer M (1 <= M <= 100000), and in the following M lines you are given two integers divided by a space that represent the coordinates of the i-th (1 <= i <= M) blue dot.

OutputTo the first line of the standard output write the maximum distance between one red and one blue dot with an accuracy of 3 decimal places.

Input:
5
1 1
3 3
5 4
4 2
5 7
6
2 1
3 4
3 2
2 3
1 2
2 5

Output:
6.708

Submit solution

Coming later

The grading service will be connected in a later migration step. You can inspect the task and your previous results now.