var a, b, d, g, ans;

function gcd(a, b){
	if(b === 0){
		g = a;
		return [1, 0];
	}
	else{
		var r = a % b;
		var q = (a - r) / b;
		var p = gcd(b, r);
		var x = p[0];
		var y = p[1];
		return [y, x - y * q];
	}
}

function test(x, y, u){
	x = Math.abs(x);
	y = Math.abs(y);
	if(ans === u || x + y < ans[0] + ans[1]){
		ans = [x, y];
	}
}

function main(u){
	while(1){
		a = scan();
		b = scan();
		d = scan();

		if(a === 0){
			break;
		}

		var p = gcd(a, b);
		var x = p[0];
		var y = p[1];
		
		var s = d / g;
		x *= s;
		y *= s;

		var ap = a / g;
		var bp = b / g;
		var k = -x / bp;
		var l = y / ap;
		test(x + bp * Math.floor(k), y - ap * Math.floor(k));
		test(x + bp * Math.ceil(k), y - ap * Math.ceil(k));
		test(x + bp * Math.floor(l), y - ap * Math.floor(l));
		test(x + bp * Math.ceil(l), y - ap * Math.ceil(l));
		print(ans.join(' '));

		ans = u;
	}
}

function rep(a, b, c, u){
	if(c === u){
		c = b;
		b = a;
		a = 0;
	}
	for(var i = a; i < b; ++i){
		if(c(i) === false){
			break;
		}
	}
}

var input = '';

function scan(){
	return +input.pop();
}
function scan_string(){
	return input.pop();
} 
function print(val){
	console.log(val);
}
 
process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', function(chunk){
	input += chunk;
});
process.stdin.on('end', function(){
	input = input.trim().split(/\s+/).reverse();
	main();
});