#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using pii = pair<int, int>;

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

int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  
  int a, b, d;
  while (cin >> a >> b >> d, a) {
    int x, y;
    int g = extgcd(a, b, x, y);
    a /= g, b /= g, d /= g;
    x *= d, y *= d;

    int ax = x, ay = y;
    int p, q;
    int w1 = abs(x) + abs(y), w2 = a * abs(x) + b * abs(y);
    p = x, q = y;
    while (true) {
      p -= b, q += a;
      if (abs(p) + abs(q) <= w1) {
        if (abs(p) + abs(q) == w1) {
          if (a * abs(p) + b * abs(q) < w2) {
            w2 = a * abs(p) + b * abs(q);
            ax = p, ay = q;
          }
        } else {
          w1 = abs(p) + abs(q);
          w2 = a * abs(p) + b * abs(q);
          ax = p, ay = q;
        }
      } else break;
    }
    p = x, q = y;
    while (true) {
      p += b, q -= a;
      if (abs(p) + abs(q) <= w1) {
        if (abs(p) + abs(q) == w1) {
          if (a * abs(p) + b * abs(q) < w2) {
            w2 = a * abs(p) + b * abs(q);
            ax = p, ay = q;
          }
        } else {
          w1 = abs(p) + abs(q);
          w2 = a * abs(p) + b * abs(q);
          ax = p, ay = q;
        }
      } else break;
    }
    cout << abs(ax) << " " << abs(ay) << endl;
  }

  return 0;
}
