Does a direct road connect the three cities?
There are three cities, and the distances between each pair of these cities are provided: a12 (between the first and second city), a13 (between the first and third city), and a23 (between the second and third city). The sequence of the cities along the road connecting them might not correspond to their numerical order; for instance, city number 2 might be the first in the sequence. Using the distances a12, a13, a23, determine: 1) if the cities are aligned on a straight road; 2) which city is positioned between the other two.
Input Data
Provide the values a12, a13, a23, separated by spaces, via the standard input.
Output Data
If the cities are aligned on a straight road, print the number of the city that is situated between the other two to the standard output. If the cities are not connected by a straight road, print zero to the standard output.