#include <cmath>
#include <iostream>
using namespace std;

long long int extgcd(long long int a, long long int b, long long int &x, long long int &y){
  long long int d = a;
  if(b){
    d = extgcd(b,a%b,y,x);
    y -= (a/b)*x;
  }else{
    x = 1;
    y = 0;
  }
  return d;
}

int main(){
  long long int a, b, d;
  while(cin >> a >> b >> d, a){
    long long int x, y, g = extgcd(a,b,x,y), r = d/g;
    x *= r; y *= r;
    a /= g;
    b /= g;
    //cout << "case1 :  " << x << " " << y << " " << g << endl;
    long long int X = abs(x), Y = abs(y);
    if(x <= 0){
      long long int x_ = (b - (-x)%b)%b;
      long long int t = (x_ - x) / b;
      y -= t*a;
      x = x_;
      if(abs(x) + abs(y) < X + Y){
        X = abs(x);
        Y = abs(y);
      }else if(abs(x) + abs(y) == X + Y && a*abs(x) + b*abs(y) < a*abs(X) + b*abs(Y)){
        X = abs(x);
        Y = abs(y);
      }
      //cout << "case2 : " << x << " " << y << endl;
      x -= b;
      y += a;
      if(abs(x) + abs(y) < X + Y){
        X = abs(x);
        Y = abs(y);
      }else if(abs(x) + abs(y) == X + Y && a*abs(x) + b*abs(y) < a*abs(X) + b*abs(Y)){
        X = abs(x);
        Y = abs(y);
      }
      //cout << "case3 : " << x << " " << y << endl;
      x += b;
      y -= a;
    }
    if(y <= 0){
      long long int y_ = (a - (-y)%a)%a;
      long long int t = (y_ - y) / a;
      x -= t*b;
      y = y_;
      if(abs(x) + abs(y) < X + Y){
        X = abs(x);
        Y = abs(y);
      }else if(abs(x) + abs(y) == X + Y && a*abs(x) + b*abs(y) < a*abs(X) + b*abs(Y)){
        X = abs(x);
        Y = abs(y);
      }
      //cout << "case4 : " << x << " " << y << endl;
      x += b;
      y -= a;
      if(abs(x) + abs(y) < X + Y){
        X = abs(x);
        Y = abs(y);
      }else if(abs(x) + abs(y) == X + Y && a*abs(x) + b*abs(y) < a*abs(X) + b*abs(Y)){
        X = abs(x);
        Y = abs(y);
      }
      //cout << "case5 : " << x << " " << y << endl;
      x -= b;
      y += a;
    }
    if(x >= 0){
      long long int x_ = x%b;
      long long int t = x / b;
      y += t*a;
      x = x_;
      if(abs(x) + abs(y) < X + Y){
        X = abs(x);
        Y = abs(y);
      }else if(abs(x) + abs(y) == X + Y && a*abs(x) + b*abs(y) < a*abs(X) + b*abs(Y)){
        X = abs(x);
        Y = abs(y);
      }
      //cout << "case6 : " << x << " " << y << endl;
      x -= b;
      y += a;
      if(abs(x) + abs(y) < X + Y){
        X = abs(x);
        Y = abs(y);
      }else if(abs(x) + abs(y) == X + Y && a*abs(x) + b*abs(y) < a*abs(X) + b*abs(Y)){
        X = abs(x);
        Y = abs(y);
      }
      //cout << "case7 : " << x << " " << y << endl;
      x += b;
      y -= a;
    }
    if(y >= 0){
      long long int y_ = y%a;
      long long int t = y / a;
      x += t*b;
      y = y_;
      if(abs(x) + abs(y) < X + Y){
        X = abs(x);
        Y = abs(y);
      }else if(abs(x) + abs(y) == X + Y && a*abs(x) + b*abs(y) < a*abs(X) + b*abs(Y)){
        X = abs(x);
        Y = abs(y);
      }
      //cout << "case8 : " << x << " " << y << endl;
      x += b;
      y -= a;
      if(abs(x) + abs(y) < X + Y){
        X = abs(x);
        Y = abs(y);
      }else if(abs(x) + abs(y) == X + Y && a*abs(x) + b*abs(y) < a*abs(X) + b*abs(Y)){
        X = abs(x);
        Y = abs(y);
      }
      //cout << "case9 : " << x << " " << y << endl;
      x -= b;
      y += a;
    }
    cout << X << " " << Y << endl;
  }
  return 0;
}

Measured memory_bytes: 2992