#include <iostream>
#include<cstdio>
#include<algorithm>
#include <cmath>
#include <cstdlib>
using namespace std;
long long exgcd(long long a,int b,int &x,int &y)
{
	if(b==0)
	{
		//x,y没赋初值
		x=1;
		y=0;
		return a;
	}
	int ret=exgcd(b,a%b,x,y);
	int tmp=x;
	x=y;
	y=tmp-a/b*y;
	return ret;
}
int main()
{
	int a,b,c;
	while(~scanf("%d%d%d",&a,&b,&c))
	{
		if(a==0&&b==0&&c==0)
		{
			break;
		}
		int x0,y0;
		int g=exgcd(a,b,x0,y0);
		int x1=(c/g*x0%(b/g)+b/g)%(b/g),y1=(c-a*x1)/b;
		int y2=(c/g*y0%(a/g)+a/g)%(a/g),x2=(c-b*y2)/a;//除a 
		x1=abs(x1);x2=abs(x2);y1=abs(y1);y2=abs(y2);//abs()在C语言中只对int整型生效
		if(x1+y1<x2+y2||a*x1+b*y1<a*x2+b*y2)
		{
			printf("%d %d\n",x1,y1);
		}
		else 
		{
			printf("%d %d\n",x2,y2);
		}
	}
	return 0;
}
