Cosine#6459

Cosine

1 second
128 megabytes
Easy

You are given two rational numbers and .

Find a non-degenerate triangle with integer side lengths such that the cosine of one angle is and the cosine of another is , and print its side lengths.

Input

The four lines contain four integers, one per line: , , and (-10^9 \leq P, U \leq 10^9, 1 \leq Q, V \leq 10^9). These integers define and as follows: x = \dfrac{P}{Q}, y = \dfrac{U}{V}.

Output

If such a non-degenerate triangle exists, print three integers on the only line of output: its side lengths in non-decreasing order. The numbers should be coprime, that is, the greatest common divisor of these three integers should be equal to . If there are multiple possible answers, print any one of them.

If such a non-degenerate triangle does not exist, print one number on the only line of output.

Examples

Example 1

Loading
Loading