#include<bits/stdc++.h>
using namespace std;
#define DEKAI (int)(1e9+7)
#define lp(i,n) for(int i=0;i<n;i++)
#define INF (1<<28)

int main(){
  while(1){
    int a,b,c;
    cin>>a>>b>>c;
    if(a==0&&b==0&&c==0) break;
    int ansa=INF,ansb=INF;
    int i=-1;
    while(1){
      i++;
      if(i>ansa+ansb+10000) break;
      int aa=a*i;
      if(aa>=c&&(aa-c)%b==0){
	if(ansa+ansb>i+(aa-c)/b){
	  ansa=i;
	  ansb=(aa-c)/b;
	}
	else if(ansa+ansb==i+(aa-c)/b){
	  if(ansa*a+ansb*b>i*a+(aa-c)){
	    ansa=i;
	    ansb=(aa-c)/b;
	  }
	}
      }
      if((aa+c)%b==0){
	if(ansa+ansb>i+(aa+c)/b){
	  ansa=i;
	  ansb=(aa+c)/b;
	}
	else if(ansa+ansb==i+(aa+c)/b){
	  if(ansa*a+ansb*b>i*a+(aa+c)){
	    ansa=i;
	    ansb=(aa+c)/b;
	  }
	}
      }
      if(c>=aa&&(c-aa)%b==0){
	if(ansa+ansb>i+(c-aa)/b){
	  ansa=i;
	  ansb=(c-aa)/b;
	}
	else if(ansa+ansb==i+(c-aa)/b){
	  if(ansa*a+ansb*b>i*a+(c-aa)){
	    ansa=i;
	    ansb=(c-aa)/b;
	  }
	}
      }
    }
    cout<<ansa<<" "<<ansb<<endl;
    // cout<<ansa*a<<" "<<ansb*b<<" "<<c<<" "<<abs(ansa*a-ansb*b)<<endl;
  }
  return 0;
}

