#include <bits/stdc++.h>
using namespace std;

#define rep(i,a,b) for(int i=a;i<b;i++)
#define INF INT_MAX/2

int main()
{
	while (1)
	{
		int a, b, d;
		cin >> a >> b >> d;
		if (a == 0) return 0;

		rep(sum, 1, 100000)
		{
			int _min = INF;
			int _x, _y;
			rep(x, 0, sum + 1)
			{
				int y = sum - x;

				if ((a*x + d == b*y || a*x == b*y + d) || a*x+b*y == d)
				{
					if (a*x + b*y < _min)
					{
						_min = a*x + b*y;
						_x = x;
						_y = y;
					}
				}
			}
			if (_min != INF)
			{
				cout << _x << " " << _y << endl;
				break;
			}
		}
	}
}