P4894 GodFly Solves the Normal Vector.

Background

“Differentiate blindly when you see a function, and set up a coordinate system blindly when you see geometry.” This is a common trait of stubborn learners. As a stubborn learner who likes setting up coordinate systems, GodFly often needs to compute normal vectors.

Description

On plane $\alpha$, there are two intersecting vectors $\vec{a}=(x_1,y_1,z_1)$ and $\vec{b}=(x_2,y_2,z_2)$. If $\vec{z}=(x,y,z)$ is a normal vector of plane $\alpha$, then: $$ \begin{cases} x \times x _ 1 + y \times y _ 1 + z \times z _ 1 = 0 \\ x \times x _ 2 + y \times y _ 2 + z \times z _ 2 = 0 \end{cases} $$ You are now given the coordinates of $\vec{a}$ and $\vec{b}$. Find one normal vector $\vec{z}$ and output its coordinates.

Input Format

This problem contains multiple test cases. For each test case, one line contains six numbers: $x_1,y_1,z_1,x_2,y_2,z_2$.

Output Format

For each test case, output three numbers $x,y,z$, separated by spaces. Separate outputs of different test cases with a blank line. The coordinates of the normal vector cannot all be $0$.

Explanation/Hint

### Constraints All coordinates (including the answer) are within the $32$-bit integer range. - For $30\%$ of the testdata, there is only one test case. - For $100\%$ of the testdata, the number of test cases $\le 5\times 10^4$, and all input coordinates are positive integers with absolute values not exceeding $5 \times 10^4$. ### Hint This problem uses Special Judge. You may output any valid solution. Translated by ChatGPT 5