#include<iomanip>
#include<limits>
#include<thread>
#include<utility>
#include<iostream>
#include<string>
#include<algorithm>
#include<set>
#include<map>
#include<vector>
#include<stack>
#include<queue>
#include<cmath>
#include<numeric>
#include<cassert>
#include<random>
#include<chrono>
#include<unordered_set>
#include<unordered_map>
#include<fstream>
#include<list>
#include<functional>
#include<bitset>
#include<complex>
#include<tuple>
using namespace std;
typedef unsigned long long int ull;
typedef long long int ll;
typedef pair<ll,ll> pll;
typedef long double D;
#define F first
#define S second
const ll E=1e18+7;
const ll MOD=1000000007;


pll good(pll A,pll B,ll a,ll b){
    if(abs(A.F)+abs(A.S)<abs(B.F)+abs(B.S) || (abs(A.F)+abs(A.S)==abs(B.F)+abs(B.S) && abs(A.F)*a+abs(A.S)*b<abs(B.F)*a+abs(B.S)*b)){return A;}
    return B;
}

const ll MX=100000;

int main(){
    ll A,B,C;
    while(cin>>A>>B>>C){
        if(A==0){return 0;}
        pll ret={MOD,MOD};
        for(ll i=-MX;i<=MX;i++){
            ll k=C+i*A;
            if(k%B==0){ret=good(ret,{i,k/B},A,B);}
        }
        cout<<abs(ret.F)<<" "<<abs(ret.S)<<endl;
    }
    
    return 0;
}

