0093. XYZ

Input file name: xyz.in
Output file name: xyz.out
Time limit: 2 s
Memory limit: 64 megabytes

Your task is to find at least one set of integer numbers x, y and z such that ax2+by2+cz2=0. You must find such set that x, y and z are not all zeroes.

Input file

Input file contains three integer numbers a, b and c, not exceeding 3000 by their absolute values.

Output file

Output any possible set x, y and z. At least one number must be non-zero. If there are no such sets, output IMPOSSIBLE instead.

Examples:

xyz.inxyz.out
1 1 -13 4 5
1 1 1IMPOSSIBLE


Source: Petrozavodsk Winter 2003. Final Contest, Saturday, February 08

Discuss       Submit a solution



Printable version