#include <iostream>
#include <fstream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <cstring>
#include <string>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <algorithm>
using namespace std;
 
#define REP(i,n) for(int i=0; i<n; ++i)
#define FOR(i,a,b) for(int i=a; i<=b; ++i)
#define FORR(i,a,b) for (int i=a; i>=b; --i)
#define pi acos(-1.0)
 
typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<VI> VVI;
typedef pair<int,int> P;
typedef pair<ll,ll> PL;

int main(){
	ll a, b, d;
	while (cin >> a >> b >> d && a){
		ll xa, ya, s = 1e9;
		FOR(x,-1000000,1000000){
			ll p = d - a*x;
			if (p % b == 0){
				ll y = p/b;
				ll xx = abs(x);
				ll yy = abs(y);
				if (xx + yy < s || (xx + yy == s && a*xx+b*yy < a*xa+b*ya)){
					s = xx + yy;
					xa = xx;
					ya = yy;
				}
			}
		}
		printf("%lld %lld\n", xa, ya);
	}

    return 0;
}