# CF 7C Line

#include <iostream>
#include <cstdlib>
#include <cstdio>
#include <cmath>
using namespace std;
typedef long long LL;

LL gcd(LL a,LL b)
{
return b ? gcd(b,a%b):a;
}
void ex_gcd(LL a,LL b,LL &x,LL &y)
{
if(b == 0)
{
x = 1;
y = 0;
return ;
}
ex_gcd(b,a%b,x,y);
LL tmp = x;
x = y;
y = tmp-(a/b)*y;
}
int main()
{
// Ax + By = -C
LL A,B,C;
while(cin>>A>>B>>C)
{
C = -C;
LL k = gcd(A,B);
if(C%k)
cout<<"-1"<<endl;
else
{
A /= k,B /= k,C /= k;
//            cout<<A<<" "<<B<<" "<<C<<endl;
LL x,y;
ex_gcd(A,B,x,y);
//            cout<<x<<" "<<y<<endl;
x *= C;
y *= C;
cout<<x<<" "<<y<<endl;
}
}
return 0;
}


#### Codeforces 7C Line(拓展欧几里得)

2017-09-26 23:12:14

#### codeforces Line 7C （拓展欧几里德+思想 模板） 好题

2015-10-24 21:04:17

#### Python CF入门实验

2016-12-20 12:15:34

#### CF command line learning

2015-04-14 16:49:16

#### 7C Line

2017-11-22 23:10:31

#### CF 7C Line(拓展欧几里得求线性方程)

2015-05-20 11:21:22

#### CF 7C Line(拓展欧几里得求线性方程)

2012-11-29 01:16:47

#### Bluemix云平台实践: 命令行的艺术CF CLI

2015-06-17 19:01:29

#### codeforces 7C Line

2017-07-14 22:39:08

#### Codeforce 7C Line

2018-04-04 10:17:36