Under construction

Still being built. Things may change

Triangle

Time limit2sMemory limit1024 MB

Summary
Given the three side midpoints of a hidden triangle, print the coordinates of its three vertices.
Level

Easy2 of 10

Topics
Math, Implementation
Solved
No attempts yet

Problem

Petya and Vasya like geometry problems and games built on them. One day Petya invented a game and explained it to Vasya.

In the game, Petya draws any non-degenerate triangle on the plane, marks the midpoints of its sides, and then erases the triangle, leaving only the three midpoints. Vasya must reconstruct the original triangle from these points.

After some thought, Vasya concluded that he can always uniquely restore the original triangle as long as the three given points do not lie on one line. To prove this, he asked you to write a program that does the restoration.

Input

Three lines each contain two integers, the coordinates of the midpoints of the triangle's sides. The absolute value of each coordinate does not exceed 10001000. The three given points do not lie on one line.

Output

Print three lines, each containing two integers: the coordinates of the vertices of the original triangle. The vertices may be printed in any order.

Examples1

  1. Example 1

    Input
    1 0
    0 1
    1 1
    
    Expected output
    0 0
    2 0
    0 2