#include <iostream>
using namespace std;
const int inf = 1012345678;
int a, b, c;
int main() {
	while (cin >> a >> b >> c, a | b | c) {
		int rx = inf, ry = inf;
		for (int i = -100000; i <= 100000; i++) {
			int res = abs(c - a * i);
			if (res % b == 0) {
				int y = abs(i), z = res / b;
				if (y + z < rx + ry) rx = y, ry = z;
				else if (y + z == rx + ry && 1LL * a * y + 1LL * b * z <= 1LL * a * rx + 1LL * b * ry) rx = y, ry = z;
			}
		}
		cout << rx << ' ' << ry << endl;
	}
	return 0;
}