/*
 * Copyright (c) 2004, 2007 Kamo Hiroyasu
 *
 * Permission to use, copy, modify, and distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */

/*
 * ACM ICPC 2004 Asia Regional Contest, Ehime
 *  Problem A  The Balance
 *  Author: Kamo Hiroyasu <wd@ics.nara-wu.ac.jp>
 */

#include <stdio.h>

int
gcd(int x, int y)
{
	int		z;

	while (y != 0) {
		z = x % y;
		x = y;
		y = z;
	}
	return x;
}

static void
balance_both_sides(int a, int b, int d, int *x_ptr, int *y_ptr)
{
	int		n;

	n = (d + a - 1) / a;
	while ((n * a - d) % b != 0) {
		n ++;
	}
	*y_ptr = (n * a - d) / b;
	*x_ptr = n;
}

static int
balance_opp_side(int a, int b, int d, int *x_ptr, int *y_ptr)
{
	int		x;

	for (x = 1; d - a * x >= b; x ++) {
		if ((d - a * x) % b == 0) {
			*y_ptr = (d - a * x) / b;
			*x_ptr = x;
			return 2;
		}
	}
	return 0;
}

int
balance(int a, int b, int d, int *x_ptr, int *y_ptr)
{
	int		g, n;
	int		x, y, x1, y1;

	g = gcd(a, b);
	if (d % g != 0) {
		return 0;
	}
	balance_both_sides(a, b, d, &x, &y);
	balance_both_sides(b, a, d, &y1, &x1);
	if (x1 + y1 < x + y ||
	    x1 + y1 == x + y && a * x1 + b * y1 < a * x + b * y) {
		x = x1;
		y = y1;
	}
	if (a <= b) {
		n = balance_opp_side(a, b, d, &x1, &y1);
	} else {
		n = balance_opp_side(b, a, d, &y1, &x1);
	}
	if (n == 2 && x1 + y1 <= x + y) {
		x = x1;
		y = y1;
	}
	*x_ptr = x;
	*y_ptr = y;
	return 2;
}

int
main(int argc, char *argv[])
{
	int		a, b, d, x, y;
	const char	*path = "A.txt";

	switch (argc) {
	case 2:
		path = argv[1];
	case 1:
		break;
	default:
		fprintf(stderr, "too many arguments\n");
		exit(1);
	}
	if (freopen(path, "r", stdin) == NULL) {
		perror(path);
		exit(1);
	}
	while (scanf("%d%d%d", &a, &b, &d) == 3 && a > 0 && b > 0) {
		if (balance(a, b, d, &x, &y) > 0) {
			printf("%d %d\n", x, y);
		} else {
			printf("NO\n");
		}
	}
	return 0;
}
