100 atcoder#ABC108B. [ABC108B] Ruined Square
[ABC108B] Ruined Square
Score : points
Problem Statement
There is a square in the -plane. The coordinates of its four vertices are and in counter-clockwise order. (Assume that the positive -axis points right, and the positive -axis points up.)
Takahashi remembers and , but he has forgot and .
Given , restore . It can be shown that and uniquely exist and have integer values.
Constraints
- ≠
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print and as integers, in this order.
0 0 0 1
-1 1 -1 0
is the four vertices of a square in counter-clockwise order. Note that is not accepted, as the vertices are in clockwise order.
2 3 6 6
3 10 -1 7
31 -41 -59 26
-126 -64 -36 -131