#include <iostream>
#include <cmath>

using namespace std;

int main(void){
    int a,b,c;
    while (cin>>a>>b>>c && a) {
        int x = 50001, y = 50001;
        for (int i = 0; i < 10001; i++) {
            int t = a*i+c;
            if (t % b == 0) {
                int j = t/b;
                if (i+j < x+y || (i+j==x+y && a*i+b*j < a*x+b*y)) x = i, y = j;
            }
            t = abs(c-(a*i));
            if (t % b == 0) {
                int j = t/b;
                if (i+j < x+y || (i+j==x+y && a*i+b*j < a*x+b*y)) x = i, y = j;
            }
        }
        cout << x << " " << y << endl;
    }
}