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

typedef long long ll;

ll gcd(ll a, ll b) {
  if (b == 0) return a;
  return gcd(b, a%b);
}

ll lcm(ll a, ll b) {
  return a/gcd(a, b)*b;
}

int main() {
  ll a, b, d;
  while (true) {
    cin >> a >> b >> d;
    if (a == 0 && b == 0 && d == 0) break;

    ll ansx = 10000000000, ansy = 10000000000;
    for (int i = -100000; i <= 100000; i++) {
      if ((d-b*i)%a != 0) continue;
      ll j = (d-b*i)/a;

      ll tx, ty;
      tx = abs(j); ty = abs(i);
      if (ansx+ansy > tx+ty ||
	  (ansx+ansy == tx+ty && ansx*a+ansy*b > tx*a+ty*b)) {
	ansx = tx;
	ansy = ty;
      }
    }

    cout << ansx << " " << ansy << endl;
  }
}