#P6330. Find the Missing Vertex of a Rectangle

    ID: 19546 Type: Default 1000ms 256MiB

Find the Missing Vertex of a Rectangle

Find the Missing Vertex of a Rectangle

Given three vertices of a rectangle whose sides are parallel to the coordinate axes, determine the coordinates of the fourth vertex.

It is guaranteed that the sides of the rectangle are parallel to the x-axis and y-axis.

Note: Two of the vertices will share the same x-coordinate and two will share the same y-coordinate. The missing x coordinate is the one that appears only once among the three given x-coordinates, and similarly for the y coordinate.

inputFormat

The input consists of a single line containing six integers: x1, y1, x2, y2, x3, y3, which represent the coordinates of three vertices of the rectangle.

outputFormat

Output the coordinates of the fourth vertex as two integers separated by a space.

sample

5 5 5 7 7 5
7 7