#include <bits/stdc++.h>
#define For(i, a, b) for(int (i)=(int)(a); (i)<(int)(b); ++(i))
#define rFor(i, a, b) for(int (i)=(int)(a)-1; (i)>=(int)(b); --(i))
#define rep(i, n) For((i), 0, (n))
#define rrep(i, n) rFor((i), (n), 0)
#define fi first
#define se second
using namespace std;
typedef long long lint;
typedef unsigned long long ulint;
typedef pair<int, int> pii;
template<class T> bool chmax(T &a, const T &b){if(a<b){a=b; return true;} return false;}
template<class T> bool chmin(T &a, const T &b){if(a>b){a=b; return true;} return false;}
template<class T> T div_floor(T a, T b){
    if(b < 0) a *= -1, b *= -1;
    return a>=0 ? a/b : (a+1)/b-1;
}
template<class T> T div_ceil(T a, T b){
    if(b < 0) a *= -1, b *= -1;
    return a>0 ? (a-1)/b+1 : a/b;
}

constexpr lint mod = 1e9+7;
constexpr lint INF = mod * mod;
constexpr int MAX = 200010;

pair<pair<lint, lint>, lint> ext_gcd(lint a, lint b){
    if(b == 0) return {{1, 0}, a};
    else if(a < b){
        auto p = ext_gcd(b, a);
        return {{p.fi.se, p.fi.fi}, p.se};
    }
    else{
        auto p = ext_gcd(b, a%b);
        lint s = p.fi.fi, t = p.fi.se;
        return {{t, s - a/b * t}, p.se};
    }
}

int main(){
    using pll = pair<lint, lint>;
    lint a, b, d;
    while(scanf("%lld%lld%lld", &a, &b, &d) && a){
        lint s, t, g;
        auto p = ext_gcd(a, b);
        tie(s, t) = p.fi; g = p.se;
        s *= d / g; t *= d / g;
        pair<pll, pll> ans = {{INF, INF}, {INF, INF}};
        lint A = a / g, B = b / g;
        lint L = min(-1.0*s/B, 1.0*t/A), R = max(-1.0*s/B, 1.0*t/A);
        For(k, L-5, R+5){
            lint x = abs(B*k + s), y = abs(-A*k + t);
            chmin(ans, {{x+y, a*x+b*y}, {x, y}});
        }
        printf("%lld %lld\n", ans.se.fi, ans.se.se);
    }
}
