#P1375I. Cubic Lattice
Cubic Lattice
Description
A cubic lattice in -dimensional euclidean space is a set of points defined in the following way: Where are some integer vectors such that:
- , and are pairwise orthogonal: Where is a dot product of vectors and .
- , and all have the same length:
You have to find a cubic lattice such that and is the maximum possible.
First line contains single integer () — the number of points in .
The -th of the following lines contains integers , , () — coordinates of the -th point.
It is guaranteed that where .
In first line output a single integer , the square of maximum possible .
In following lines output coordinates of vectors , and respectively.
If there are multiple possible answers, output any.
Input
First line contains single integer () — the number of points in .
The -th of the following lines contains integers , , () — coordinates of the -th point.
It is guaranteed that where .
Output
In first line output a single integer , the square of maximum possible .
In following lines output coordinates of vectors , and respectively.
If there are multiple possible answers, output any.