// AOJ 1248: The Balance
// 2017.12.17 bal4u@uu

#include <stdio.h>
#include <math.h>

int a, b;
int ansx, ansy;

void answer(int x, int y)
{
	if (x + y < ansx + ansy) ansx = x, ansy = y;
	else if (a*x + b*y < a*ansx + b*ansy) ansx = x, ansy = y;
}

int main()
{
	int d, t, x, ax, lim;

	while(scanf("%d%d%d", &a, &b, &d) && a > 0) {
		ansx = 0x7ffff, ansy = 0x7ffff;
		lim = d << 2; if (lim > 10000) lim = 10000;
		for (ax = x = 0; x < lim; x++, ax += a) {
			t = ax + d;
			if (!(t % b)) answer(x, t/b);
			t -= d << 1;
			if (t >= 0 && !(t % b)) answer(x, t/b);
			t = -t;
			if (t >= 0 && !(t % b)) answer(x, t/b);
		}
		printf("%d %d\n", ansx, ansy);
	}
	return 0;
}