#include <iostream>
#include <vector>
#include <cstring>
#include <string>
#include <algorithm>
#include <iomanip>
#include <cmath>
#include <cassert>
using namespace std;
typedef long long ll;
const ll INF = 1LL << 50;

ll a, b, d;

bool ok(ll ax, ll ay, ll x, ll y) {
	return ax + ay > x + y || ax + ay == x + y && a * ax + b * ay > a * x + b * y;
}

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);


	while(cin >> a >> b >> d, a | b | d) {
		ll ax = INF, ay = INF;
		for(ll x = 0; x <= 50000; x++) {
			if((d + a * x) % b == 0) {
				ll y = (d + a * x) / b;
				if(ok(ax, ay, x, y)) {
					ax = x;
					ay = y;
				}
			}
			if(a * x - d >= 0 && (a * x - d) % b == 0) {
				ll y = (a * x - d) / b;
				if(ok(ax, ay, x, y)) {
					ax = x;
					ay = y;
				}
			}
			if(d - a * x >= 0 && (d - a * x) % b == 0) {
				ll y = (d - a * x) / b;
				if(ok(ax, ay, x, y)) {
					ax = x;
					ay = y;
				}
			}
		}
		cout << ax << " " << ay << endl;
	}
}