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


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

int main() {
    int a, b, d;
    while(cin >> a >> b >> d, a) {
        int x = 0, y = 0;
        int g = extgcd(a, b, x, y);
        x *= d/g, y *= d/g;
        a /= g, b /= g, d /= g;
        int tx = x, ty = y;
        int minxy = abs(tx) + abs(ty),
            minab = abs(tx) * a + abs(ty) * b;
        int resx = abs(x), resy = abs(y);
        while(tx < 0 || ty > 0) {
            tx += b; ty -= a;
            if(minxy > abs(tx) + abs(ty) ||
               minxy == abs(tx)+abs(ty) && minab > abs(tx)*a + abs(ty)*b) {
                minab = abs(tx) * a + abs(ty) * b;
                minxy = abs(tx) + abs(ty);
                resx = abs(tx); resy = abs(ty);
            }
        }
        tx = x, ty=y;
        while(tx > 0 || ty < 0) {
            tx -= b; ty += a;
            if(minxy > abs(tx) + abs(ty) ||
               minxy == abs(tx)+abs(ty) && minab > abs(tx)*a + abs(ty)*b) {
                minab = abs(tx) * a + abs(ty) * b;
                minxy = abs(tx) + abs(ty);
                resx = abs(tx); resy = abs(ty);
            }
        }
        cout << resx << " " << resy << endl;
    }
}
