/*
 * 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>
#include <stdlib.h>

static inline int
min(int a, int b)
{
	return a <= b ? a : b;
}

static inline int
max(int a, int b)
{
	return a >= b ? a : b;
}

static inline int
floor_div(int a, int b)
{
	int		q, r;

	q = a / b;
	r = a % b;
	if (r < 0) {
		q --;
	}
	return q;
}

static inline int
ceil_div(int a, int b)
{
	int		q, r;

	q = a / b;
	r = a % b;
	if (r > 0) {
		q ++;
	}
	return q;
}

int
gcdxy(int a, int b, int *x_ptr, int *y_ptr)
{
	int		r0, r1, r2, x0, x1, x2, y0, y1, y2;
	int		q;

	r0 = a; r1 = b;
	x0 = 1; x1 = 0;
	y0 = 0; y1 = -1;
	while (r1 != 0) {
		r2 = r0 % r1;
		q = r0 / r1;
		x2 = x0 - q * x1;
		y2 = y0 - q * y1;
		r0 = r1; r1 = r2;
		x0 = x1; x1 = x2;
		y0 = y1; y1 = y2;
	}
	*x_ptr = x0;
	*y_ptr = y0;
	return r0;
}

int
balance(int a, int b, int d, int *x_ptr, int *y_ptr)
{
	int		x, y, x1, y1, x2, y2, xa, ya, xb, yb;
	int		g, m, s, t, k1, k2, k3;

	g = gcdxy(a, b, &x, &y);
	if (d % g != 0) {
		return 0;
	}
	m = d / g;
	x *= m;
	y *= m;
	s = b / g;
	t = a / g;
	k1 = min(floor_div(x, s), floor_div(y, t));
	x1 = x - k1 * s;
	y1 = y - k1 * t;
	k2 = max(ceil_div(x, s), ceil_div(y, t));
	x2 = x - k2 * s;
	y2 = y - k2 * t;
	xa = - x2;
	ya = - y2;
	if (x1 + y1 < xa + ya
	    || x1 + y1 == xa + ya && a * x1 + b * y1 <= a * xa + b * ya) {
		xa = x1;
		ya = y1;
	}
	k3 = a > b ? k1 + 1 : k2 - 1;
	xb = abs(x - k3 * s);
	yb = abs(y - k3 * t);
	if (xb + yb < xa + ya
	    || xb + yb == xa + ya && a * xb + b * yb <= a * xa + b * ya) {
		xa = xb;
		ya = yb;
	}
	*x_ptr = xa;
	*y_ptr = ya;
	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;
}
