#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <sstream>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <numeric>
#include <cctype>
#include <cassert>

// BEGIN CUT HERE
#ifdef _MSC_VER
#include <agents.h>
#endif
// END CUT HERE 

#define FOR(i, a, b) for(int i = (a); i < (int)(b); ++i)
#define rep(i, n) FOR(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define REV(v) v.rbegin(), v.rend()
#define MEMSET(v, s) memset(v, s, sizeof(v))
#define MP make_pair
#define MT make_tuple
#define X first
#define Y second

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> P;

const int N = 5e4;
int main(){
	int a, b, d;
	while (cin >> a >> b >> d, a){
		tuple<ll, ll, pair<ll, ll>> ans = MT(1e6, 0, MP(0, 0));
		for (ll y = -N; y <= N; ++y){
			ll x = d - b*y;
			if (x%a) continue;
			x /= a;
			ll ax = abs(x), ay = abs(y);
			ans = min(ans, MT(ax + ay, a*ax + b*ay, MP(ax, ay)));
		}
		auto p = get<2>(ans);
		cout << p.first << ' ' << p.second << endl;
	}

	return 0;
}