#P6330. [COCI 2007/2008 #1] CETVRTA

[COCI 2007/2008 #1] CETVRTA

Problem Description

Given the coordinates of three vertices of a rectangle on the coordinate plane, determine the coordinates of the fourth vertex and output them.

It is guaranteed that the sides of the rectangle are parallel to the coordinate axes.

Input Format

There are 33 lines. Each line contains two integers between 11 and 10001000 (inclusive), representing the coordinates of one vertex of the rectangle.

Output Format

Output one line with two integers, representing the coordinates of the fourth vertex.

5 5
5 7
7 5
7 7
30 20
10 10
10 20
30 10

Hint

Explanation

This problem is translated from COCI2007-2008 CONTEST #1 T1 CETVRTA

Translated by ChatGPT 5