#CF7C. Line

Line

题面翻译

一条直线:Ax+By+C=0(AB不同时为0),找到任意一个点(在-5e18~5e18之间)让它的横纵坐标均为整数,或者确定没有这样的点。

输入:A,B,C

输出:该点坐标,没有就输出-1

题目描述

A line on the plane is described by an equation Ax+By+C=0 Ax+By+C=0 . You are to find any point on this line, whose coordinates are integer numbers from 51018 -5·10^{18} to 51018 5·10^{18} inclusive, or to find out that such points do not exist.

输入格式

The first line contains three integers A A , B B and C C ( 2109<=A,B,C<=2109 -2·10^{9}<=A,B,C<=2·10^{9} ) — corresponding coefficients of the line equation. It is guaranteed that A2+B2>0 A^{2}+B^{2}>0 .

输出格式

If the required point exists, output its coordinates, otherwise output -1.

样例 #1

样例输入 #1

2 5 3

样例输出 #1

6 -3