原题链接--
https://acs.jxnu.edu.cn/problem/CF7Chttps://acs.jxnu.edu.cn/problem/CF7C
Line
1000ms 262144K
描述:
A line on the plane is described by an equation Ax + By + C = 0. You are to find any point on this line, whose coordinates are integer numbers from - 5·10e18 to 5·10e18 inclusive, or to find out that such points do not exist.
译文: 飞机上的一条线通过一个等式Ax + By + C = 0来描述。你必须找出线上的任意点,坐标是- 5·10e18到5·10e18的整数(包含边界),否则查明并不存在如此的点。
输入:
The first line contains three integers A, B and C ( - 2·10e9 ≤ A, B, C ≤ 2·10e9) — corresponding coefficients of the line equation. It is guaranteed that A2 + B2 > 0.
译文:第一行输入包含三个整数A, B和C ( - 2·10e9 ≤ A, B, C ≤ 2·10e9) —等式的对应系数。保证A2+B2>0。
输出:
If the required point exists, output its coordinates, otherwise output -1.
译文:所需的点存在,输出其坐标,否则输出-1.
样例输入:
2 5 3
样例输出:
6 -3