## DMOPC '17 Contest 4 P0 - Catch

View as PDF

Points: 3
Time limit: 1.0s
Memory limit: 64M

Author:
Problem type

The problem statement is incorrect. The intent of the statement is to compute the square of the minimum pairwise distance between Alice, Bob, and Charlie. Anyone seriously affected by this mistake may ask to be unrated for this contest.

Alice, Bob, and Charlie are playing a game of catch. David wants to join, but he knows that he can't throw as far as Alice, Bob, or Charlie, so he requests to stand no further from Alice than Bob and Charlie, no further from Bob than Alice and Charlie, and no further from Charlie than Alice and Bob. If represents the longest distance between David and any of the three other players, what is the maximum possible value of ?

#### Input Specification

The first line of input will have two integers, and , Alice's location.
The second line of input will have two integers, and , Bob's location.
The third and final line of input will have two integers, and , Charlie's location.

#### Output Specification

A single integer, the maximum value of .

#### Sample Input

1 0
2 0
3 0

#### Sample Output

1

#### Explanation for Sample Output

The square of the pairwise distances are , , and . The smallest of these is .