Vertices of rectangle. Given integer coordinates of three vertices of a rectangle whose sides are parallel to the coordinate axes, find the coordinates of the fourth vertex of the rectangle. In the first test the three given vertices are (1, 4), (1, 6), (7, 4). The fourth vertex is thus (7, 6).
Input |
Correct answer |
1 |
7 |
7 |
7 4 |
1 |
1 6 |