COCI '07 Contest 1 #1 Cetvrta

View as PDF

Submit solution

Points: 5
Time limit: 1.0s
Memory limit: 32M

Problem types

Mirko needs to choose four points in the plane so that they form a rectangle with sides parallel to the axes. He has already chosen three points and is confident that he hasn't made a mistake, but is having trouble locating the last point. Help him.

Input Specification

Each of the three points already chosen will be given on a separate line. All coordinates will be integers between 1 and 1\,000.

Output Specification

Output the coordinates of the fourth vertex of the rectangle.

Sample Input 1

5 5
5 7
7 5

Sample Output 1

7 7

Sample Input 2

30 20
10 10
10 20

Sample Output 2

30 10


There are no comments at the moment.