
#include <iostream>
#include <stdio.h>
#include <vector>
#include <string>
#include <cmath>
#include <algorithm>

using namespace std;
typedef long long int ll;

struct data_t {
	static ll pa, pb;
	ll f, s;
};
ll data_t::pa, data_t::pb;

int solve(const ll a, const ll b, const ll d);
ll getinv(const ll pa, const ll pb, const ll d) {
	for (ll i = 0; i < pb; i++) {
		ll a = (pa*i) % pb;
		if (a == d%pb) { return i; }
	}
	return 1;
}
ll gcd(ll p, ll q) {
	//?????§??¬?´???°???????????????
	if (q == 0) { return p; }
	return gcd(q, p%q);
}

int main(void) {
	ll a, b, d;
	cin >> a >> b >> d;
	while (solve(a,b,d))
		cin >> a >> b >> d;
	return 0;
}

int solve(const ll a, const ll b, const ll d) {

	if (!(a|b|d)){ return 0; }
	ll g = gcd( gcd(a,b), d );

	ll pa, pb, pd;
		pa = a / g;
		pb = b / g;
		pd = d / g;

	//cout << pa << "/" << pb << "/" << pd << endl;
		data_t::pa = pa;
		data_t::pb = pb;

	vector<data_t> v(4);
	v[0].f = getinv(pa, pb, pd);
	v[1].f = v[0].f - pb;
	v[2].s = getinv(pb, pa, pd);
	v[3].s = v[2].f - pa;
	
	for (int i = 0; i < 2; i++)
		v[i].s = (pd - v[i].f*pa) / pb;
	for (int i = 2; i < 4; i++)
		v[i].f = (pd - v[i].s*pb) / pa;
	for (int i = 0; i < 4; i++) {
		v[i].f = abs(v[i].f);
		v[i].s = abs(v[i].s);
	}

	data_t ans = v[0];
	for (int i = 0; i < v.size(); i++) {
		int t1, t2;
			t1 = ans.f + ans.s;
			t2 = v[i].f + v[i].s;
		if ( t1 > t2) {
			ans = v[i];
		} else if ( t1 == t2 ) {
			if (ans.f*pa + ans.s*pb > v[i].f*pa + v[i].s*pb) { ans = v[i]; }
		}
	}
	cout << ans.f << " " << ans.s << endl;
	return 1;
}