https://www.luogu.com.cn/problem/CF7C
题目描述
A line on the plane is described by an equation Ax+By+C=0Ax+By+C=0 . You are to find any point on this line, whose coordinates are integer numbers from -5·10^{18}−5⋅1018 to 5·10^{18}5⋅1018 inclusive, or to find out that such points do not exist.
输入格式
The first line contains three integers AA , BB and CC ( -2·10^{9}<=A,B,C<=2·10^{9}−2⋅109<=A,B,C<=2⋅109 ) — corresponding coefficients of the line equation. It is guaranteed that A^{2}+B^{2}>0A2+B2>0 .
输出格式
If the required point exists, output its coordinates, otherwise output -1.
有一条直线被这样一个方程描述Ax+By+C=0。你要找到这条直线的一个点(在-5e18~5e18之间),坐标均为整数。或者这样的点不存在。
输入第一行包含三个整数A,B,C,且A方加B方>0
输出这样的点,不存在输出-1.