We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.

Loading...

- Practice
- Mathematics
- Fundamentals
- Most Distant

# Most Distant

# Most Distant

Keko has dots in a 2-D coordinate plane. He wants to measure the gap between the most distant two dots. To make the problem easier, Keko decided to change each dot's *or* coordinate to zero.

Help Keko calculate the distance!

**Input Format**

The first line contains an integer, , the number of dots.

The next lines each contain the integer coordinates of the dots in fashion.

**Constraints**

It is guaranteed that all dots are distinct, and either their or coordinate is equal to .

**Output Format**

Print the distance between the most distant dots with an absolute error of, at most, .

**Sample Input**

```
4
-1 0
1 0
0 1
0 -1
```

**Sample Output**

```
2.000000
```

**Explanation**

In the sample, the most distant dots are located at and .

The distance between them is .