Vasya has n burles. One bottle of Ber-Cola costs a burles and one Bars bar costs b burles. He can buy any non-negative integer number of bottles of Ber-Cola and any non-negative integer number of Bars bars.

Find out if it's possible to buy some amount of bottles of Ber-Cola and Bars bars and spend exactly n burles.

In other words, you should find two non-negative integers x and y such that Vasya can buy x bottles of Ber-Cola and y Bars bars and x·a + y·b = n or tell that it's impossible.


-----Input-----

First line contains single integer n (1 ≤ n ≤ 10 000 000) — amount of money, that Vasya has.

Second line contains single integer a (1 ≤ a ≤ 10 000 000) — cost of one bottle of Ber-Cola.

Third line contains single integer b (1 ≤ b ≤ 10 000 000) — cost of one Bars bar.


-----Output-----

If Vasya can't buy Bars and Ber-Cola in such a way to spend exactly n burles print «NO» (without quotes).

Otherwise in first line print «YES» (without quotes). In second line print two non-negative integers x and y — number of bottles of Ber-Cola and number of Bars bars Vasya should buy in order to spend exactly n burles, i.e. x·a + y·b = n. If there are multiple answers print any of them.

Any of numbers x and y can be equal 0.


-----Examples-----
Input
7
2
3

Output
YES
2 1

Input
100
25
10

Output
YES
0 10

Input
15
4
8

Output
NO

Input
9960594
2551
2557

Output
YES
1951 1949



-----Note-----

In first example Vasya can buy two bottles of Ber-Cola and one Bars bar. He will spend exactly 2·2 + 1·3 = 7 burles.

In second example Vasya can spend exactly n burles multiple ways:   buy two bottles of Ber-Cola and five Bars bars;  buy four bottles of Ber-Cola and don't buy Bars bars;  don't buy Ber-Cola and buy 10 Bars bars. 

In third example it's impossible to but Ber-Cola and Bars bars in order to spend exactly n burles.

Difficulty: EASY
Tags: Number theory

Implementation

Complete search
Skill types: Complete search

Starter code:

Solutions:
n = int(input())
a = int(input())
b = int(input())
f = 0
if a % 2 == 0 and b % 2 == 0 and (n % 2 != 0):
	print('NO')
elif a == b:
	if n % a != 0:
		print('NO')
	else:
		print('YES')
		print(int(n / a), 0)
elif a % 3 == 0 and b % 3 == 0 and (n % 3 != 0):
	print('NO')
else:
	if n % a == 0:
		print('YES')
		f = 1
		print(int(n / a), 0)
	elif n % b == 0:
		print('YES')
		f = 1
		print(0, int(n / b))
	else:
		t = max(a, b)
		s = min(a, b)
		while t < n:
			if (n - t) % s == 0:
				print('YES')
				f = 1
				if a < b:
					print(int((n - t) / a), int(t / b))
				else:
					print(int(t / a), int((n - t) / b))
				break
			t = t + max(a, b)
	if f == 0:
		print('NO')


import bisect

def list_output(s):
	print(' '.join(map(str, s)))

def list_input(s='int'):
	if s == 'int':
		return list(map(int, input().split()))
	elif s == 'float':
		return list(map(float, input().split()))
	return list(map(str, input().split()))
n = int(input())
a = int(input())
b = int(input())
for x in range(n + 1):
	t = n - x * a
	if t >= 0 and t % b == 0:
		y = t // b
		print('YES')
		print(' '.join(map(str, [x, y])))
		exit(0)
print('NO')


a = int(input())
b = int(input())
c = int(input())
ans = 0
while a > 0 and a % b != 0:
	a = a - c
	ans += 1
if a < 0:
	print('NO')
else:
	print('YES')
	print(a // b, ans)


import math

def main():
	n = int(input())
	a = int(input())
	b = int(input())
	if n % math.gcd(a, b):
		print('NO')
	else:
		flag = 0
		if a < b:
			(a, b) = (b, a)
			flag = 1
		for i in range(1 + n // a):
			if (n - i * a) % b == 0:
				print('YES')
				if flag:
					print((n - i * a) // b, i)
				else:
					print(i, (n - i * a) // b)
				return
		print('NO')
main()


(n, x, y) = (int(input()), int(input()), int(input()))
f = 0
for i in range(n // x + 1):
	s = n - i * x
	if s % y == 0:
		f = 1
		l = [i, s // y]
		break
if f == 0:
	print('NO')
else:
	print('YES')
	print(*l)


n = int(input())
a = int(input())
b = int(input())
for x in range(n // a + 1):
	y = (n - x * a) // b
	if n == x * a + y * b:
		print('YES')
		print(x, y)
		break
else:
	print('NO')


import math
n = int(input())
a = int(input())
b = int(input())
g = math.gcd(a, b)
if n % g != 0:
	print('NO')
else:
	x = 0
	while a * x <= n:
		if (n - a * x) % b == 0:
			print('YES')
			print(x, (n - a * x) // b)
			break
		x += 1
	else:
		print('NO')


n = int(input())
a = int(input())
b = int(input())
if a == b and n % a != 0:
	print('NO')
elif n % a == 0:
	print('YES')
	print(n // a, end=' ')
	print(0)
elif n % b == 0:
	print('YES')
	print('0', end=' ')
	print(n // b)
elif n % 2 == 1 and a % 2 == 0 and (b % 2 == 0):
	print('NO')
elif max(a, b) % min(a, b) == 0 and n % a != 0 and (n % b != 0):
	print('NO')
elif a + b > n:
	print('NO')
else:
	i = 0
	if a > b:
		while i <= n // a and (n - a * i) % b != 0:
			i = i + 1
		if i > n // a:
			print('NO')
		else:
			print('YES')
			print(i, end=' ')
			print((n - a * i) // b)
	else:
		while i <= n // b and (n - b * i) % a != 0:
			i = i + 1
		if i > n // b:
			print('NO')
		else:
			print('YES')
			print((n - b * i) // a, end=' ')
			print(i)


n = int(input())
Ber_Cola = int(input())
Bars_bar = int(input())
bigger = max(Ber_Cola, Bars_bar)
smaller = min(Ber_Cola, Bars_bar)
if Ber_Cola == Bars_bar and n % Ber_Cola != 0:
	print('NO')
	exit()
for i in range(n // bigger + 1):
	if (n - bigger * i) % smaller == 0:
		print('YES')
		Ber_Cola_n = (n - bigger * i) // smaller
		Bars_bar_n = i
		if Ber_Cola == bigger:
			(Ber_Cola_n, Bars_bar_n) = (i, (n - bigger * i) // smaller)
		print(Ber_Cola_n, Bars_bar_n)
		exit()
print('NO')


n = int(input())
x = int(input())
y = int(input())
import sys

def gcd(a, b):
	if b > a:
		return gcd(b, a)
	if a % b == 0:
		return b
	return gcd(b, a % b)
d = gcd(x, y)
if n % d != 0:
	print('NO')
	sys.exit(0)

def phi(n):
	result = n
	i = 2
	while i * i <= n:
		if n % i == 0:
			while n % i == 0:
				n //= i
			result -= result // i
		i += 1
	if n > 1:
		result -= result // n
	return result
x1 = x // d
y1 = y // d
n = n // d
b = n * pow(y1, phi(x1) - 1, x1) % x1
a = (n - y1 * b) // x1
if a >= 0 and b >= 0:
	print('YES')
	print(a, b)
else:
	print('NO')


n = int(input())
a = int(input())
b = int(input())
if a > b and max(a, b) % min(a, b) != 0:
	x = n // a
	for i in range(x + 1):
		y = (n - i * a) // b
		if y == (n - i * a) / b:
			print('YES')
			print(i, end=' ')
			print(y, end='')
			exit(0)
elif a < b and max(a, b) % min(a, b) != 0:
	y = n // b
	for i in range(y + 1):
		x = (n - i * b) // a
		if x == (n - i * b) / a:
			print('YES')
			print(x, end=' ')
			print(i, end='')
			exit(0)
elif a == b:
	if n // a == n / b:
		print('YES')
		print(0, n // a)
		exit(0)
elif max(a, b) % min(a, b) == 0:
	if n // min(a, b) == n / min(a, b):
		print('YES')
		if a == max(a, b):
			print(0, n // b)
		else:
			print(n // a, 0)
		exit(0)
print('NO')


import math

def solve():
	n = int(input())
	a = int(input())
	b = int(input())
	if n % 2 != 0 and a % 2 == 0 and (b % 2 == 0):
		print('NO')
		return
	else:
		for x in range(10000001):
			k = n - a * x
			if k >= 0 and k % b == 0:
				print('YES')
				print(x, k // b)
				return
			if k < 0:
				print('NO')
				return
	print('NO')
	return
for _ in range(1):
	solve()


n = int(input())
a = int(input())
b = int(input())

def gcd(x, y):
	if y == 0:
		return x
	else:
		return gcd(y, x % y)
x = True
if n % gcd(a, b) == 0:
	if a > b:
		for i in range(0, n // a + 1):
			if (n - i * a) % b == 0:
				print('YES')
				x = False
				print(i, '', (n - i * a) // b)
				break
	else:
		for i in range(0, n // b + 1):
			if (n - i * b) % a == 0:
				print('YES')
				x = False
				print((n - i * b) // a, '', i)
				break
if x:
	print('NO')


z = input
(n, a, b) = (int(z()), int(z()), int(z()))
for i in range(min(a, b, n // max(a, b) + 1)):
	if (n - i * a) % b == 0:
		print('YES')
		print(i, (n - a * i) // b)
		break
	elif (n - b * i) % a == 0:
		print('YES')
		print((n - b * i) // a, i)
		break
else:
	print('NO')


x = int(input())
y = int(input())
z = int(input())
cola = 0
bar = 0
toolong = 2 + x % 1000 + y * z
for i in range(x):
	if y == z and x % y != 0 or x <= 0 or toolong <= 0 or (x < z and x < y):
		print('NO')
		break
	if x % y == 0:
		cola = x // y
		print('YES')
		print(cola, bar)
		break
	if x % z == 0:
		bar = x // z
		print('YES')
		print(cola, bar)
		break
	elif y >= z:
		if x % z == 0:
			bar = x // z
			print('YES')
			print(cola, bar)
			break
		while x % z != 0 and toolong > 0 and (x > 0):
			x -= y
			cola += 1
			toolong -= y
	elif z >= y:
		if x % y == 0:
			cola = x // y
			print('YES')
			print(cola, bar)
			break
		while x % y != 0 and toolong > 0 and (x > 0):
			x -= z
			bar += 1
			toolong -= y


n = int(input())
a = int(input())
b = int(input())
aa = []
i = 0
while i * a <= n:
	aa.append(i * a)
	i += 1
f = 0
for i in range(len(aa)):
	if (n - aa[i]) % b == 0:
		f = 1
		print('YES')
		print(i, (n - aa[i]) // b)
		break
if f == 0:
	print('NO')


import math

def extendedgcd(x, y):
	if x < y:
		(x, y) = (y, x)
	if x % y == 0:
		return [0, 1, y]
	eqn = [1, -1 * int(x / y), 0]
	coeff = extendedgcd(y, x % y)
	return [eqn[0] * coeff[1], coeff[1] * eqn[1] + coeff[0], coeff[2]]
(n, a, b) = (int(input()), int(input()), int(input()))
eqn = extendedgcd(a, b)
if a < b:
	(eqn[0], eqn[1]) = (eqn[1], eqn[0])
if not n % eqn[2] == 0:
	print('NO')
else:
	eqn[0] *= n / eqn[2]
	eqn[1] *= n / eqn[2]
	if not eqn[0] < 0 and eqn[1] < 0 or (not eqn[1] < 0 and eqn[0] < 0):
		if eqn[0] < 0:
			(low, high) = (-1 * eqn[0] * eqn[2] / b, eqn[1] * eqn[2] / a)
			low = low if math.ceil(low) == low else math.ceil(low)
			high = high if math.floor(high) == high else math.floor(high)
			if low <= high:
				(x, y) = (eqn[0] + low * b / eqn[2], eqn[1] - low * a / eqn[2])
				print('YES\n' + str(int(x)) + ' ' + str(int(y)))
			else:
				print('NO')
		elif eqn[1] < 0:
			(low, high) = (-1 * eqn[1] * eqn[2] / a, eqn[0] * eqn[2] / b)
			low = low if math.ceil(low) == low else math.ceil(low)
			high = high if math.floor(high) == high else math.floor(high)
			if low <= high:
				(x, y) = (eqn[0] - low * b / eqn[2], eqn[1] + low * a / eqn[2])
				print('YES\n' + str(int(x)) + ' ' + str(int(y)))
			else:
				print('NO')
	elif eqn[0] >= 0 and eqn[1] >= 0:
		print('YES\n' + str(int(eqn[0])) + ' ' + str(int(eqn[1])))
	else:
		print('NO')


n = int(input())
a = int(input())
b = int(input())
for i in range(0, n):
	if (n - i * b) % a == 0 and n - i * b >= 0:
		print('YES')
		print((n - i * b) // a, i)
		exit()
print('NO')


def HOD(a, b):
	if a * b == 0:
		return a + b
	if a > b:
		(a, b) = (b, a)
	return HOD(a, b % a)

def main():
	n = int(input())
	a = int(input())
	b = int(input())
	if n % HOD(a, b):
		print('NO')
	else:
		f = 0
		if a < b:
			(a, b) = (b, a)
			f = 1
		for i in range(1 + n // a):
			if (n - i * a) % b == 0:
				print('YES')
				if f:
					print((n - i * a) // b, i)
				else:
					print(i, (n - i * a) // b)
				return
		print('NO')
main()


import re
import sys
from bisect import bisect, bisect_left, insort, insort_left
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from itertools import accumulate, combinations, combinations_with_replacement, groupby, permutations, product
from math import acos, asin, atan, ceil, cos, degrees, factorial, gcd, hypot, log2, pi, radians, sin, sqrt, tan
from operator import itemgetter, mul
from string import ascii_lowercase, ascii_uppercase, digits

def inp():
	return int(input())

def inlist():
	return list(map(int, input().split()))

def instr():
	s = input()
	return list(s[:len(s)])

def invr():
	return map(int, input().split())
n = inp()
a = inp()
b = inp()
if n % gcd(a, b) == 0:
	y = 0
	x = 0
	while y * b <= n:
		if (n - b * y) % a == 0:
			if n - b * y >= 0:
				x = (n - b * y) // a
				print('YES')
				print(x, y)
				break
		y += 1
	else:
		print('NO')
else:
	print('NO')


from math import gcd, ceil
n = int(input())
a = int(input())
b = int(input())
g = gcd(a, b)
if n % g != 0:
	print('NO')
	exit()

def gcdex(a, b):
	if b == 0:
		return (a, 1, 0)
	else:
		(d, x, y) = gcdex(b, a % b)
		return (d, y, x - y * (a // b))
(k, xg, yg) = gcdex(a, b)
(x, y) = (xg * (n // g), yg * (n // g))
delx = b // g
dely = a // g

def printing(x, y, dx, dy):
	ko = ceil(-x / dx)
	x += ko * dx
	y -= ko * dy
	if y < 0:
		print('NO')
	elif dx == delx:
		if x * a + y * b == n:
			print('YES')
			print(x, y)
		else:
			print('NO')
	elif y * a + x * b == n:
		print('YES')
		print(y, x)
	else:
		print('NO')
if x < 0 and y < 0:
	print('NO')
elif x >= 0 and y >= 0:
	print('YES')
	print(x, y)
elif x < 0:
	printing(x, y, delx, dely)
elif y < 0:
	printing(y, x, dely, delx)


x = int(input())
y = int(input())
z = int(input())
cola = bar = 0
toolong = 1 + y * z
for i in range(toolong):
	if x % y == 0:
		cola = x // y
		break
	if x % z == 0:
		bar = x // z
		break
	if y == z and x % y != 0 or z + y > x or x <= 0 or (toolong <= 0):
		print('NO')
		quit()
	while x % y != 0 and toolong > 0 and (x >= z):
		x -= z
		bar += 1
		toolong -= z
print('YES')
print(cola, bar)


c = int(input())
a = int(input())
b = int(input())
a_r = c // a + 1
b_r = c // b + 1
x = 0
y = 0
stat = False
if a_r >= b_r:
	for i in range(0, a_r):
		if (c - a * i) % b == 0 and (c - a * i) // b < b_r:
			stat = True
			x = i
			y = (c - a * i) // b
			break
else:
	for i in range(0, b_r):
		if (c - b * i) % a == 0 and (c - b * i) // a < a_r:
			stat = True
			x = (c - b * i) // a
			y = i
			break
if stat:
	print('YES')
	print(x, y)
else:
	print('NO')


from sys import stdin
input = stdin.readline
from heapq import heapify, heappush, heappop, heappushpop
from collections import defaultdict as dd, deque as dq, Counter as C
from math import factorial as f, ceil, gcd, sqrt, log
from bisect import bisect_left as bl, bisect_right as br
from itertools import combinations as c, permutations as p
from math import factorial as f, ceil, gcd, sqrt, log
mi = lambda : map(int, input().split())
ii = lambda : int(input())
li = lambda : list(map(int, input().split()))
mati = lambda r: [li() for _ in range(r)]
lcm = lambda a, b: a * b // gcd(a, b)

def solve():
	n = ii()
	a = ii()
	b = ii()
	if n % a == 0:
		print('YES')
		print(n // a, 0)
		return
	elif n % b == 0:
		print('YES')
		print(0, n // b)
		return
	else:
		for x in range(1, n // a + 2):
			if (n - a * x) % b == 0 and n - a * x > 0:
				print('YES')
				print(x, (n - a * x) // b)
				return
	print('NO')
for _ in range(1):
	solve()


n = int(input())
a = int(input())
b = int(input())
f = 0
if a < b:
	(a, b) = (b, a)
	f = 1
i = 0
s = n
while s > 0:
	s = n - i * a
	if s < 0:
		print('NO')
		break
	p = s % b
	if p == 0:
		print('YES')
		if f == 0:
			print(i, s // b)
		else:
			print(s // b, i)
		break
	i = i + 1
else:
	print('NO')


n = int(input())
a = int(input())
b = int(input())
for x in range(n + 1):
	if (n - x * a) % b == 0 and (n - x * a) // b >= 0:
		print('YES')
		print(x, (n - x * a) // b)
		exit()
print('NO')


from collections import defaultdict, deque, Counter
from sys import stdin, stdout
from heapq import heappush, heappop
import math
from math import gcd
import io
import os
from collections import defaultdict, deque, Counter
from sys import stdin, stdout
from heapq import heappush, heappop
import math
import io
import os
import math
import bisect

def isPrime(x):
	for i in range(2, x):
		if i * i > x:
			break
		if x % i == 0:
			return False
	return True

def ncr(n, r, p):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p

def primeFactors(n):
	l = []
	while n % 2 == 0:
		l.append(2)
		n = n / 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			l.append(int(i))
			n = n / i
	if n > 2:
		l.append(n)
	return list(set(l))

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime

def digits(n):
	c = 0
	while n > 0:
		n //= 10
		c += 1
	return c

def ceil(n, x):
	if n % x == 0:
		return n // x
	return n // x + 1

def mapin():
	return map(int, input().split())
tt = ['NO', 'YES']
n = int(input())
a = int(input())
b = int(input())
n2 = n
while n % a and n > 0:
	n -= b
if n < 0:
	print('NO')
else:
	print('YES')
	print(n // a, (n2 - n) // b)


n = int(input())
a = int(input())
b = int(input())
for i in range(n + 1):
	if a * i > n:
		break
	elif (n - a * i) % b == 0:
		print('YES')
		print(i, (n - a * i) // b)
		exit()
print('NO')


n = int(input())
a = int(input())
b = int(input())
l = n // a
for i in range(l, -1, -1):
	t = n - i * a
	r = t % b
	if r == 0:
		print('YES')
		print(i, t // b)
		break
if r != 0:
	print('NO')


n = int(input())
a = int(input())
b = int(input())

def gcd(a, b):
	if a == 0:
		return (b, 0, 1)
	(d, x1, y1) = gcd(b % a, a)
	x = y1 - x1 * (b // a)
	y = x1
	return (d, x, y)
(d, x, y) = gcd(a, b)
(d, x, y) = gcd(d, n)
a //= d
b //= d
n //= d
(d, x, y) = gcd(a, b)
if d > 1:
	print('NO')
else:
	x0 = x * n
	y0 = y * n
	l = (-x0 + b - 1) // b
	r = y0 // a
	if r - l >= 0:
		print('YES')
		print(x0 + b * l, y0 - a * l)
	else:
		print('NO')


n = int(input())
a = int(input())
b = int(input())
h = 0
for i in range(n + 1):
	if (n - a * i) % b == 0 and n - a * i >= 0:
		print('YES')
		print(i, (n - a * i) // b)
		h += 1
		break
if h == 0:
	print('NO')


import sys
import math
import itertools
import collections

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(map(int, input().split()))

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def wr(arr):
	return ' '.join(map(str, arr))

def revn(n):
	return str(n)[::-1]

def dd():
	return collections.defaultdict(int)

def ddl():
	return collections.defaultdict(list)

def sieve(n):
	if n < 2:
		return list()
	prime = [True for _ in range(n + 1)]
	p = 3
	while p * p <= n:
		if prime[p]:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 2
	r = [2]
	for p in range(3, n + 1, 2):
		if prime[p]:
			r.append(p)
	return r

def divs(n, start=1):
	r = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				r.append(i)
			else:
				r.extend([i, n // i])
	return r

def divn(n, primes):
	divs_number = 1
	for i in primes:
		if n == 1:
			return divs_number
		t = 1
		while n % i == 0:
			t += 1
			n //= i
		divs_number *= t

def prime(n):
	if n == 2:
		return True
	if n % 2 == 0 or n <= 1:
		return False
	sqr = int(math.sqrt(n)) + 1
	for d in range(3, sqr, 2):
		if n % d == 0:
			return False
	return True

def convn(number, base):
	newnumber = 0
	while number > 0:
		newnumber += number % base
		number //= base
	return newnumber

def cdiv(n, k):
	return n // k + (n % k != 0)
n = ii()
a = ii()
b = ii()
c = math.gcd(a, b)
if n % c != 0:
	print('NO')
else:
	nc = n // c
	ac = a // c
	bc = b // c
	for i in range(10 ** 7 + 1):
		if nc - ac * i >= 0 and (nc - ac * i) % bc == 0:
			print('YES')
			exit(print(i, (nc - ac * i) // bc))
	print('NO')


n = int(input())
a = int(input())
b = int(input())
if n % a == 0:
	print('YES')
	print(n // a, 0)
elif n % b == 0:
	print('YES')
	print(0, n // b)
else:
	if a > b:
		mx = a
		mn = b
	else:
		mx = b
		mn = a
	ch = 1
	init = n // mx
	for i in range(init, 0, -1):
		if (n - i * mx) % mn == 0:
			ch = 0
			print('YES')
			if a > b:
				print(i, (n - i * mx) // mn)
			else:
				print((n - i * mx) // mn, i)
			break
	if ch:
		print('NO')


import math

def extended_gcd(a, b):
	(s, old_s) = (0, 1)
	(t, old_t) = (1, 0)
	(r, old_r) = (b, a)
	while r != 0:
		quotient = old_r // r
		(old_r, r) = (r, old_r - quotient * r)
		(old_s, s) = (s, old_s - quotient * s)
		(old_t, t) = (t, old_t - quotient * t)
	return (old_r, (old_s, old_t))

def main():
	n = int(input())
	a = int(input())
	b = int(input())
	(gcd_ab, (e, f)) = extended_gcd(a, b)
	if n % gcd_ab != 0:
		print('NO')
		return
	h = n // gcd_ab
	x = e * h
	y = f * h
	step_x = b // gcd_ab
	step_y = a // gcd_ab
	lower_k = math.ceil(-x / step_x)
	upper_k = math.floor(y / step_y)
	if lower_k <= upper_k:
		print('YES')
		s1 = x + lower_k * step_x
		s2 = y - lower_k * step_y
		print('{} {}'.format(s1, s2))
	else:
		print('NO')
main()


def egcd(a, b):
	(x, y, u, v) = (0, 1, 1, 0)
	while a != 0:
		(q, r) = (b // a, b % a)
		(m, n) = (x - u * q, y - v * q)
		(b, a, x, y, u, v) = (a, r, u, v, m, n)
	gcd = b
	return (gcd, x, y)
import math
n = int(input())
a = int(input())
b = int(input())
(gcd, x, y) = egcd(a, b)
status = 0
if n % gcd != 0:
	print('NO')
else:
	multiply = n / gcd
	x1 = int(multiply * x)
	y1 = int(multiply * y)
	d1 = b / gcd
	d2 = a / gcd
	rangemin = int(math.ceil(-x1 / d1))
	rangemax = int(y1 // d2)
	if rangemin > rangemax:
		print('NO')
	else:
		m = rangemin
		while m <= rangemax:
			solx = x1 + m * d1
			soly = y1 - m * d2
			if solx >= 0 and soly >= 0:
				print('YES')
				status = 1
				print(str(int(solx)) + ' ' + str(int(soly)))
				break
			m = m + 1
		if status == 0:
			print('NO')


c = int(input())
m = int(input())
n = int(input())

def gcd(n, m):
	if m == 0:
		return n
	else:
		return gcd(m, n % m)
if c % gcd(n, m) == 0:
	f = 0
	x = c // n
	while x >= 0:
		if (c - x * n) % m == 0:
			f = 1
			break
		else:
			x -= 1
	if f == 1:
		y = (c - x * n) // m
		print('YES')
		print(y, x)
	else:
		print('NO')
else:
	print('NO')


n = int(input())
a = int(input())
b = int(input())
na = -1
nb = -1
i = 0
while i * a <= n:
	if (n - i * a) % b == 0:
		na = i
		nb = (n - i * a) // b
		break
	i += 1
if na >= 0:
	print('YES')
	print('{} {}'.format(na, nb))
else:
	print('NO')


import sys, re
n = int(sys.stdin.readline())
a = int(sys.stdin.readline())
b = int(sys.stdin.readline())
for i in range(10000001):
	if (n - a * i) % b == 0 and n - a * i >= 0:
		print('YES')
		print(i, (n - a * i) // b)
		sys.exit(0)
print('NO')


import sys, math, io, os, time, itertools, collections
mod = 10 ** 9 + 7
sys.setrecursionlimit(10000)
i = sys.stdin.readline
p = sys.stdout.write
global start, end

def isin(l, x):
	left = 0
	right = len(l) - 1
	if x < l[0]:
		return -1
	while left <= right:
		mid = left + (right - left) // 2
		if l[mid] == x:
			return mid
		elif l[mid] < x:
			ans = mid
			left = mid + 1
		else:
			right = mid - 1
	return ans

def ispal(l):
	n = len(l)
	for i in range(n // 2 + 1):
		if l[i] != l[n - i - 1]:
			return False
	return True

def ccarray(l):
	d = {l[k]: k for k in range(len(l))}
	m = sorted(d)
	return [d[m[k]] for k in range(len(l))]

def is_prime(n):
	if n <= 3:
		return n > 1
	if n % 2 == 0 or n % 3 == 0:
		return False
	k = 5
	while k ** 2 <= n:
		if n % k == 0 or n % (k + 2) == 0:
			return False
		k += 6
	return True

def sieve(n):
	prime = [True for k in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for k in range(p * p, n + 1, p):
				prime[k] = False
		p += 1

def main():
	n = int(i())
	a = int(i())
	b = int(i())
	if a < b:
		for k in range(a):
			if n - k * b >= 0 and (n - k * b) % a == 0:
				p('YES\n')
				p(str((n - k * b) // a) + ' ' + str(k) + '\n')
				break
		else:
			p('NO\n')
	else:
		for k in range(b):
			if n - k * a >= 0 and (n - k * a) % b == 0:
				p('YES\n')
				p(str(k) + ' ' + str((n - k * a) // b) + '\n')
				break
		else:
			p('NO\n')
t = 1
start = time.perf_counter()
for _ in range(t):
	main()
end = time.perf_counter()


n = int(input())
a = int(input())
b = int(input())
ans = 'NO'
arr = []
for x in range(n // a + 1):
	if (n - x * a) % b == 0:
		ans = 'YES'
		arr.append(x)
		arr.append((n - x * a) // b)
		break
print(ans)
if ans == 'YES':
	print(*arr)


n = int(input())
a = int(input())
b = int(input())
p = max(a, b)
q = min(a, b)
if p % q == 0 and n % q != 0:
	print('NO')
elif n % p == 0:
	print('YES')
	ans1 = int(n / p)
	ans2 = 0
	if a > b:
		print(ans1, ans2)
	else:
		print(ans2, ans1)
else:
	xp = 0
	while n > 0:
		if n % q == 0:
			print('YES')
			ans1 = xp
			ans2 = int(n / q)
			break
		else:
			n -= p
			xp += 1
	if n < 0:
		print('NO')
	elif a > b:
		print(ans1, ans2)
	else:
		print(ans2, ans1)


n = int(input())
a = int(input())
b = int(input())
(y, g) = (0, 0)
ans1 = (n - b * y) // a
ans2 = (n - a * g) // b
while (n - b * y) % a != 0 and n - b * y >= 0:
	y += 1
while (n - a * g) % b != 0 and n - a * g >= 0:
	g += 1
if n - b * y < 0 and n - a * g < 0:
	print('NO')
else:
	print('YES')
	if ans1 > 0:
		print((n - b * y) // a, y)
	else:
		print(g, (n - a * g) // b)


import sys
input = sys.stdin.buffer.readline
n = int(input())
a = int(input())
b = int(input())
if n % a == 0 or n % b == 0 or n % (a + b) == 0:
	print('YES')
	if n % a == 0:
		print(n // a, 0)
	elif n % b == 0:
		print(0, n // b)
	else:
		print(n // (a + b), n // (a + b))
else:
	rest = n % (a + b)
	ans = n // (a + b)
	if rest % a == 0 or rest % b == 0:
		print('YES')
		if rest % a == 0:
			print(ans + rest // a, ans)
		else:
			print(ans, ans + rest // b)
	else:
		isprinted = False
		i = 0
		while i < n and n - i * a >= 0:
			if (n - i * a) % b == 0:
				print('YES')
				print(i, (n - i * a) // b)
				isprinted = True
				break
			i += 1
		if isprinted == False:
			print('NO')


def getHCF(a, b):
	c = min(a, b)
	d = max(a, b)
	if d % c == 0:
		return c
	return getHCF(d % c, c)
n = int(input())
a = int(input())
b = int(input())
hcfAB = getHCF(a, b)
printed = False
if n % hcfAB != 0:
	pass
else:
	n /= hcfAB
	a /= hcfAB
	b /= hcfAB
	for y in range(int(n / b) + 1):
		if (n - b * y) % a == 0:
			print('YES')
			print(int((n - b * y) / a), ' ', int(y))
			printed = True
			break
if not printed:
	print('NO')


def main():
	n = int(input())
	a = int(input())
	b = int(input())
	if n % a == 0:
		print('YES')
		print(int(n / a), 0)
		return
	if n % b == 0:
		print('YES')
		print(0, int(n / b))
		return
	if a % 2 == 0 and b % 2 == 0:
		if n % 2 == 1:
			print('NO')
			return
	mx = max(a, b)
	mn = min(a, b)
	new = 0
	found = 0
	i = 0
	while n >= 0:
		if n % mn == 0:
			found = 1
			new = n
			break
		n -= mx
		i += 1
	if found:
		print('YES')
		if mx == a:
			print(i, int(new / b))
		if mx == b:
			print(int(new / a), i)
	else:
		print('NO')
main()


from sys import stdin, stdout
n = int(stdin.readline())
a = int(stdin.readline())
b = int(stdin.readline())
x = 0
flg = False
if a % 2 == 0 and b % 2 == 0 and (not n % 2 == 0):
	stdout.write('NO\n')
	exit()
elif n % a == 0:
	stdout.write('YES\n')
	stdout.write(str(n // a) + ' ' + str(0))
	exit()
elif n % b == 0:
	stdout.write('YES\n')
	stdout.write(str(0) + ' ' + str(n // b))
	exit()
elif a == b and (not n % b == 0):
	stdout.write('NO\n')
else:
	l = max(a, b)
	r = min(a, b)
	while l < n:
		if (n - l) % r == 0:
			print('YES')
			fig = True
			if a < b:
				stdout.write(str((n - l) // a) + ' ' + str(l // b))
				exit()
			else:
				stdout.write(str(l // a) + ' ' + str((n - l) // b))
				exit()
			break
		l = l + max(a, b)
	if not flg:
		stdout.write('NO\n')


n = int(input())
a = int(input())
b = int(input())
flags = False
for i in range(n // a + 1):
	if n - i * a >= 0 and (n - i * a) % b == 0:
		print('YES')
		print(i, (n - i * a) // b)
		flags = True
		break
if not flags:
	print('NO')


n = int(input())
a = int(input())
b = int(input())
ma = max(a, b)
mi = min(a, b)
k = ma // mi
count = 0
if a == b:
	if n % a == 0:
		print('YES')
		print(0, n // a)
	else:
		print('NO')
elif ma // mi == ma / mi:
	if n % mi == 0:
		print('YES')
		if b == ma:
			print(n // a, 0)
		else:
			print(0, n // b)
	else:
		print('NO')
elif b > a:
	for i in range(n // b + 2):
		if n - i * b >= 0 and (n - i * b) % a == 0:
			print('YES')
			count = 1
			print((n - i * b) // a, end=' ')
			print(i)
			break
	if count == 0:
		print('NO')
else:
	for i in range(n // a + 2):
		if n - i * a >= 0 and (n - i * a) % b == 0:
			print('YES')
			count = 1
			print(i, end=' ')
			print((n - i * a) // b, end=' ')
			break
	if count == 0:
		print('NO')


n = int(input())
a = int(input())
b = int(input())
p = n // a
t = 0
for i in range(p + 1):
	if (n - i * a) % b == 0:
		t += 1
		(r, q) = (i, (n - i * a) // b)
		break
if t == 0:
	print('NO')
else:
	print('YES')
	print(r, q)


n = int(input())
a = int(input())
b = int(input())
i = 0
if b % a == 0:
	if n % a != 0:
		print('NO')
		exit()
if a % b == 0:
	if n % b != 0:
		print('NO')
		exit()
if a >= b:
	while i <= n // a + 1:
		if (n - i * a) % b == 0:
			print('YES')
			print(str(i) + ' ' + str(int((n - i * a) / b)))
			break
		i += 1
		if i == n // a + 1:
			print('NO')
			break
else:
	a1 = b
	b1 = a
	while i <= n // a1 + 1:
		if (n - i * a1) % b1 == 0:
			print('YES')
			print(str(int((n - i * a1) / b1)) + ' ' + str(i))
			break
		i += 1
		if i == n // a1 + 1:
			print('NO')
			break


n = int(input())
a = int(input())
b = int(input())
bul = 0
for x in range(n // a + 1):
	if (n - x * a) % b == 0:
		print('YES')
		print(str(x) + ' ' + str((n - x * a) // b))
		bul = 1
		break
if bul == 0:
	print('NO')


def mp():
	return map(int, input().split())

def it():
	return int(input())
n = it()
a = it()
b = it()
(x, y) = (0, 0)
while n % b != 0 and n >= 0:
	n -= a
	x += 1
if n < 0:
	print('NO')
else:
	print('YES')
	print(x, n // b)


n = int(input())
a = int(input())
b = int(input())
for i in range(0, n // a + 1):
	if (n - i * a) % b == 0:
		print('YES')
		print(' '.join(map(str, [i, (n - i * a) // b])))
		exit()
print('NO')


n = int(input())
a = int(input())
b = int(input())
for i in range(10 ** 7 + 4):
	x = a * i
	if n - x >= 0:
		d = n - x
		if d % b == 0:
			print('YES')
			print(i, d // b)
			exit()
	else:
		break
print('NO')


import bisect
import collections
import copy
import functools
import heapq
import itertools
import math
import random
import re
import sys
import time
import string
from typing import List, Mapping
sys.setrecursionlimit(999999)
n = int(input())
a = int(input())
b = int(input())
if n < min(a, b) or n % math.gcd(a, b):
	print('NO')
	exit()
if n % a == 0:
	print('YES')
	print(n // a, 0)
	exit()
if n % b == 0:
	print('YES')
	print(0, n // b)
	exit()
for i in range(n // a + 1):
	if (n - i * a) % b == 0:
		print('YES')
		print(i, (n - i * a) // b)
		exit()
print('NO')


n = int(input())
a = int(input())
b = int(input())
i = 0
k = 0

def gcd(a, b):
	if b == 0:
		return a
	elif a == 0:
		return b
	else:
		return gcd(max(a, b) % min(a, b), min(a, b))
if n % gcd(a, b) != 0:
	print('NO')
elif a > b:
	highend = int(n / a)
	while i <= highend:
		if (n - i * a) % b == 0:
			print('YES')
			print(i, int((n - i * a) / b))
			k = 1
			i = highend + 1
		i += 1
	if k == 0:
		print('NO')
else:
	highend = int(n / b)
	while i <= highend:
		if (n - i * b) % a == 0:
			print('YES')
			print(int((n - i * b) / a), i)
			k = 1
			i = highend + 1
		i += 1
	if k == 0:
		print('NO')


class CodeforcesTask898BSolution:

	def __init__(self):
		self.result = ''
		self.n = 0
		self.a = 0
		self.b = 0

	def read_input(self):
		self.n = int(input())
		self.a = int(input())
		self.b = int(input())

	def process_task(self):
		self.result = 'NO'
		for x in range(10000000):
			if x * self.a > self.n:
				break
			if not (self.n - self.a * x) % self.b:
				y = (self.n - self.a * x) // self.b
				self.result = 'YES\n{0} {1}'.format(x, y)
				break

	def get_result(self):
		return self.result
Solution = CodeforcesTask898BSolution()
Solution.read_input()
Solution.process_task()
print(Solution.get_result())


from math import sqrt
n = int(input())
a = int(input())
b = int(input())
for i in range(int(n / 2 + 0.5)):
	if n - i * b >= 0 and (n - i * b) % a == 0:
		print('YES')
		print((n - i * b) // a, i)
		exit()
print('NO')


def low(butt, ass):
	if butt < ass:
		return butt
	else:
		return ass
n = int(input())
cb = int(input())
bb = int(input())
i = 1
v = 0
w = 0
flag = False
muxi = max(bb, cb)
luxi = low(bb, cb)
if muxi == cb:
	flag = True
ans = i * muxi
if muxi % luxi == 0 and n % luxi != 0:
	print('NO')
elif n % cb == 0 or n % bb == 0:
	print('YES')
	if n % cb == 0:
		print('{} {}'.format(n // cb, 0))
	elif n % bb == 0:
		print('{} {}'.format(0, n // bb))
else:
	while ans <= n:
		if (n - ans) % luxi == 0:
			print('YES')
			if flag:
				print('{} {}'.format(i, (n - ans) // luxi))
			else:
				print('{} {}'.format((n - ans) // luxi, i))
			exit()
		i += 1
		ans = muxi * i
	print('NO')


def read():
	return [int(v) for v in input().split()]

def main():
	n = read()[0]
	a = read()[0]
	b = read()[0]
	for x in range(0, n // a + 2):
		y = int((n - a * x) / b)
		if y >= 0 and a * x + b * y == n:
			print('YES\n{} {}'.format(x, y))
			return
	print('NO')
main()


n = int(input())
a = int(input())
b = int(input())

def gcd(a, b):
	if a * b == 0:
		return a + b
	return gcd(b, a % b)
d = gcd(a, b)
if n % d != 0:
	print('NO')
else:
	(n, a, b) = (n // d, a // d, b // d)
	if a >= b:
		for x in range(n // a + 1):
			if (n - a * x) % b == 0:
				print('YES')
				print(x, (n - a * x) // b)
				break
		else:
			print('NO')
	else:
		for y in range(n // b + 1):
			if (n - b * y) % a == 0:
				print('YES')
				print((n - b * y) // a, y)
				break
		else:
			print('NO')


from sys import stdin, stdout
n = int(stdin.readline())
a = int(stdin.readline())
b = int(stdin.readline())
x = 0
flg = False
while n >= 0:
	if n % b == 0 or n % b == 0:
		stdout.write('YES\n')
		stdout.write(str(x) + ' ' + str(n // b))
		flg = True
		break
	n = n - a
	x += 1
if not flg:
	stdout.write('NO\n')


n = int(input())
a = int(input())
b = int(input())
flag = 0
if n % a == 0 or n % b == 0:
	flag = 1
	print('YES')
	if n % a == 0:
		print(str(int(n / a)) + ' 0')
	else:
		print('0 ' + str(int(n / b)))
elif a % b == 0 or b % a == 0:
	if n % a == 0:
		flag = 1
		print('YES')
		print(str(int(n / a)) + ' 0')
	elif n % b == 0:
		flag = 1
		print('YES')
		print(' 0' + str(int(n / b)))
else:
	i = 1
	while a * i <= n and b * i <= n and (a + b) * i:
		p = n - a * i
		q = n - b * i
		if p % b == 0 or q % a == 0:
			flag = 1
			print('YES')
			if p % b == 0:
				print(str(int(i)) + ' ' + str(int(p / b)))
			else:
				print(str(int(q / a)) + ' ' + str(int(i)))
			break
		i = i + 1
if flag == 0:
	print('NO')


n = int(input())
a = int(input())
b = int(input())
for i in range(n // 2 + 1):
	if i % a == 0 and (n - i) % b == 0:
		print('YES')
		print(i // a, (n - i) // b)
		break
	elif i % b == 0 and (n - i) % a == 0:
		print('YES')
		print((n - i) // a, i // b)
		break
else:
	print('NO')


n = int(input())
a = int(input())
b = int(input())
x = 0
flag = 0
while x <= n:
	if (n - x) % b == 0:
		print('YES')
		print(x // a, (n - x) // b)
		flag = 1
		break
	else:
		x += a
if flag == 0:
	print('NO')


import math
n = int(input())
a = int(input())
b = int(input())
MAXVAL = 10000000
x = 0
while a * x <= n:
	if (n - x * a) % b == 0:
		print('YES')
		print(x, (n - x * a) // b)
		return
	x += 1
print('NO')


x = int(input())
y = int(input())
z = int(input())
cola = bar = 0
toolong = 1 + y * z
while x % y != 0 and toolong > 0 and (x > y):
	x -= z
	bar += 1
	toolong -= z
if x % y == 0 and x > 0:
	cola += x // y
elif x % z == 0 and x > 0:
	bar += x // z
else:
	print('NO')
	quit()
print('YES')
print(cola, bar)


from sys import stdin, stdout
import math
n = int(stdin.readline().rstrip())
a = int(stdin.readline().rstrip())
b = int(stdin.readline().rstrip())
if a == 1:
	print('YES')
	print(' '.join([str(n), '0']))
elif b == 1:
	print('YES')
	print(' '.join(['0', str(n)]))
else:
	x = 0
	possible = False
	while n >= 0:
		if n % b == 0:
			y = n // b
			possible = True
			break
		x += 1
		n -= a
	if possible:
		print('YES')
		print(' '.join([str(x), str(y)]))
	else:
		print('NO')


(c, a, b) = (int(input()), int(input()), int(input()))

def r(c, a, b):
	for i in range(b):
		x = c - a * i
		if x >= 0:
			if x % b == 0:
				return [i, x // b]
		else:
			return False
	return False
t = r(c, max(a, b), min(a, b))
if t:
	print('YES')
	print(*(t if a == max(a, b) else t[::-1]))
else:
	print('NO')


m = int(input())
(a, b) = (int(input()), int(input()))
sw = 0 if a >= b else 1
if sw:
	(a, b) = (b, a)
if a * (m // a) == m:
	print('YES')
	aa = m // a
	bb = 0
	if sw:
		(aa, bb) = (bb, aa)
	print(aa, bb)
else:
	mm = m
	aa = 0
	while m > 0:
		if b * (m // b) == m:
			print('YES')
			bb = m // b
			if sw:
				(aa, bb) = (bb, aa)
			print(aa, bb)
			break
		aa += 1
		m -= a
	else:
		print('NO')


(n, a, b) = [int(input()) for _ in [0] * 3]
for i in range(n + 2):
	if i * a > n:
		break
	if (n - i * a) % b < 1:
		print(f'YES\n{i} {(n - i * a) // b}')
		break
if i * a > n:
	print('NO')


import math

def ixgcd(a, b):
	(x0, x1, y0, y1) = (1, 0, 0, 1)
	while b:
		(q, a, b) = (a // b, b, a % b)
		(x0, x1) = (x1, x0 - q * x1)
		(y0, y1) = (y1, y0 - q * y1)
	return (a, x0, y0)
c = int(input())
a = int(input())
b = int(input())
(d, x0, y0) = ixgcd(a, b)
if c % d == 0 and min(a, b) <= c:
	x0 *= c // d
	y0 *= c // d
	if x0 >= 0 and y0 >= 0:
		print('YES')
		print(x0, y0)
	elif x0 < 0 and y0 < 0:
		print('NO')
	else:
		if x0 < 0:
			k = d * x0 / b
		elif y0 < 0:
			k = -1 * d * y0 / a
		if k < 0:
			k = math.floor(k)
		elif k > 0:
			k = math.ceil(k)
		x1 = x0 - k * b // d
		y1 = y0 + k * a // d
		if x1 < 0 or y1 < 0:
			print('NO')
		else:
			print('YES')
			print(x1, y1)
else:
	print('NO')


n = int(input())
a = int(input())
b = int(input())
find = False
i = 0
while i * a <= n:
	if (n - a * i) % b == 0:
		print('YES')
		print('{} {}'.format(i, int((n - a * i) / b)))
		find = True
		break
	i += 1
if not find:
	print('NO')


n = int(input())
x = int(input())
y = int(input())
c = 0
while n >= 0 and n % y != 0:
	n = n - x
	c += 1
if n >= 0:
	print('YES')
	print(c, n // y)
else:
	print('NO')


a = int(input())
b = int(input())
c = int(input())
if b > c:
	for j in range(a // b + 1):
		if (a - j * b) % c == 0:
			print('YES')
			print(j, (a - j * b) // c)
			break
	else:
		print('NO')
else:
	for j in range(a // c + 1):
		if (a - j * c) % b == 0:
			print('YES')
			print((a - j * c) // b, j)
			break
	else:
		print('NO')


import sys
import string
from collections import Counter, defaultdict
from math import fsum, sqrt, gcd, ceil, factorial
from itertools import combinations, permutations
flush = lambda : sys.stdout.flush
comb = lambda x, y: factorial(x) // factorial(y) // factorial(x - y)
ip = lambda : input()
ii = lambda : int(input())
r = lambda : map(int, input().split())
rr = lambda : list(r())
n = ii()
a = ii()
b = ii()
for i in range(10 ** 7):
	x = n - i * a
	if x >= 0 and x % b == 0:
		print('YES')
		print(i, x // b)
		exit()
print('NO')


(n, a, b, x) = (int(input()), int(input()), int(input()), 0)
while x * a <= n:
	if (n - x * a) % b == 0:
		print('YES')
		print(x, (n - x * a) // b)
		exit()
	x += 1
print('NO')


from math import ceil
n = int(input())
a = int(input())
b = int(input())

def egcd(a, b):
	if a == 0:
		return (0, 1, b)
	(x, y, g) = egcd(b % a, a)
	x_ = y - b // a * x
	y_ = x
	return (x_, y_, g)
(x_, y_, g) = egcd(a, b)
ans = False
if n % g == 0:
	ans = True
if not ans:
	print('NO')
else:
	x = x_ * (n // g)
	y = y_ * (n // g)
	p1 = b // g
	p2 = a // g
	if x < 0:
		k = -x // p1
		x += p1 * k
		y -= p2 * k
	if x < 0:
		x += p1
		y -= p2
	if y < 0:
		k = y // p2
		x += p1 * k
		y -= k * p2
	if y < 0:
		x -= p1
		y += p2
	if x < 0 or y < 0:
		print('NO')
	else:
		print('YES')
		print(x, y)


n = int(input())
x = int(input())
y = int(input())
m = n
if n % x == 0:
	print('YES')
	print(n // x, 0)
	exit()
if n % y == 0:
	print('YES')
	print(0, n // y)
	exit()
while n > 0:
	if n % y == 0 and (m - n) % x == 0:
		print('YES')
		print((m - n) // x, n // y)
		exit()
	n -= x
print('NO')


n = int(input())
a = int(input())
b = int(input())
x = 0
while True:
	y = (n - x * a) / b
	if y < 0:
		print('NO')
		break
	if int(y) == y:
		print('YES')
		print(x, int(y))
		break
	else:
		x += 1


n = int(input())
a = int(input())
b = int(input())
for x in range(0, n // a + 1):
	if (n - x * a) % b == 0:
		print('YES')
		print(x, (n - a * x) // b)
		quit()
print('NO')


import sys
LI = lambda : list(map(int, sys.stdin.readline().split()))
MI = lambda : map(int, sys.stdin.readline().split())
SI = lambda : sys.stdin.readline().strip('\n')
II = lambda : int(sys.stdin.readline())
(c, a, b) = (II(), II(), II())
ok = False
for i in range(0, c, a):
	if (c - i) % b == 0:
		ok = True
		ans = [i // a, (c - i) // b]
for i in range(0, c, b):
	if (c - i) % a == 0:
		ok = True
		ans = [(c - i) // a, i // b]
if ok:
	print('YES')
	print(*ans)
else:
	print('NO')


c = int(input())
a = int(input())
b = int(input())
ans = 'NO'
for i in range(c // a + 1):
	if (c - a * i) % b == 0:
		ans = 'YES\n' + str(i) + ' ' + str((c - a * i) // b)
		break
print(ans)


mod = 1000000007
ii = lambda : int(input())
si = lambda : input()
dgl = lambda : list(map(int, input()))
f = lambda : map(int, input().split())
il = lambda : list(map(int, input().split()))
ls = lambda : list(input())
n = ii()
n1 = n
n2 = n
a = ii()
b = ii()
(c1, c2, c3, c4) = (0, 0, 0, 0)
while n >= b:
	if n % a == 0:
		c1 += n // a
		break
	n -= b
	c2 += 1
while n1 >= a:
	if n1 % b == 0:
		c4 = n1 // b
		break
	n1 -= a
	c3 += 1
if c1 + c2 >= c3 + c4 and c1 * a + c2 * b == n2:
	print('YES')
	print(c1, c2)
elif c3 * a + c4 * b == n2:
	print('YES')
	print(c3, c4)
else:
	print('NO')


a = int(input())
c1 = int(input())
c2 = int(input())
i = 0
x = -1
y = -1
while i * c1 <= a:
	if (a - i * c1) % c2 == 0:
		x = i
		y = (a - i * c1) // c2
		break
	i += 1
if x >= 0:
	print('YES')
	ans = str(x) + ' ' + str(y)
	print(ans)
else:
	print('NO')


n = int(input())
a = int(input())
b = int(input())
res = 0
numb = a if a >= b else b
no_numb = a if numb == b else b
if a == b:
	if n % a == 0:
		print('YES')
		print('%d %d' % (0, n / no_numb))
		exit()
	else:
		print('NO')
		exit()
for i in range(n // numb + 1):
	if (n - i * numb) % no_numb == 0:
		print('YES')
		if numb == a:
			print('%d %d' % (i, (n - i * numb) / no_numb))
			exit(0)
		if numb == b:
			print('%d %d' % ((n - i * numb) / no_numb, i))
			exit(0)
print('NO')


n = int(input())
a = int(input())
b = int(input())
bigger = max(a, b)
smaller = min(a, b)
if a == b and n % a != 0:
	print('NO')
	exit()
for i in range(n // bigger + 1):
	if (n - bigger * i) % smaller == 0:
		print('YES')
		Ber_Cola = i
		Bars_bar = (n - bigger * i) // smaller
		if b > a:
			(Ber_Cola, Bars_bar) = (Bars_bar, Ber_Cola)
		print(Ber_Cola, Bars_bar)
		exit()
print('NO')


n = int(input())
a = int(input())
b = int(input())
x = 0
for i in range(1000000):
	if (n - x) % a == 0:
		print('YES')
		print((n - x) // a, x // b)
		break
	x += b
	if x > n:
		print('NO')
		break
else:
	print('NO')


from sys import stdin
n = int(stdin.readline())
a = int(stdin.readline())
b = int(stdin.readline())

def get_anwser(n, a, b):
	answer = ('NO', -1, -1)
	for i in range(0, 10 ** 7 + 1):
		if n - a * i >= 0 and (n - a * i) % b == 0:
			return f'YES\n{i} {(n - a * i) // b}'
	return 'NO'
print(get_anwser(n, a, b))


import math
import sys
N = int(input())
a = int(input())
b = int(input())
div = math.gcd(N, math.gcd(a, b))
if div == 1:
	if math.gcd(a, b) != 1:
		print('NO')
		sys.exit()
else:
	(N, a, b) = (N / div, a / div, b / div)
if a == 1:
	print('YES')
	print(int(a * N), 0)
	sys.exit()
elif b == 1:
	print('YES')
	print(0, int(b * N))
	sys.exit()
elif N % 2 == 0:
	if a == 2:
		print('YES')
		print(int(N / 2), 0)
		sys.exit()
	elif b == 2:
		print('YES')
		print(0, int(N / 2))
		sys.exit()
r = 0
while r * a <= N:
	if (N - r * a) % b == 0:
		print('YES')
		print(r, int((N - r * a) / b))
		sys.exit()
	r += 1
print('NO')


n = int(input())
a = int(input())
b = int(input())
MAXVAL = 10000000
for x in range(MAXVAL):
	y = (n - x * a) // b
	if y < 0:
		break
	if a * x + y * b == n:
		print('YES')
		print(x, y)
		return
print('NO')


import os.path
from math import gcd, floor, ceil
from collections import *
import sys
from heapq import *
mod = 1000000007
INF = float('inf')

def st():
	return list(sys.stdin.readline().strip())

def li():
	return list(map(int, sys.stdin.readline().split()))

def mp():
	return map(int, sys.stdin.readline().split())

def inp():
	return int(sys.stdin.readline())

def pr(n):
	return sys.stdout.write(str(n) + '\n')

def prl(n):
	return sys.stdout.write(str(n) + ' ')
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
(n, a, b) = [inp() for i in range(3)]
flag = 0
cur = 0
while True:
	left = n - cur * b
	if left < 0:
		break
	if left % a == 0:
		print('YES')
		print(left // a, cur)
		flag = 1
		break
	cur += 1
if flag == 0:
	pr('NO')


n = int(input())
a = int(input())
b = int(input())
if n // a < n // b:
	k = a
	m = b
else:
	k = b
	m = a
flag = 0
if n // k > 0:
	for i in range(0, n // k + 1):
		if (n - i * k) % m == 0:
			flag = 1
			print('YES')
			if k == a:
				print(i, end=' ')
				print((n - i * k) // m)
			elif k == b:
				print((n - i * k) // m, end=' ')
				print(i)
			break
	if flag == 0:
		print('NO')
elif n % m == 0:
	print('YES')
	if k == a:
		print(0, end=' ')
		print(n // m)
	else:
		print(n // m, end=' ')
		print(0)
else:
	print('NO')


import math
n = int(input())
a = int(input())
b = int(input())
d = math.gcd(a, b)
if n % d != 0:
	print('NO')
	exit()
x = 0
while (n - a * x) % b != 0:
	x += 1
	if n < x * a:
		print('NO')
		exit()
y = (n - a * x) // b
print('YES')
print(x, y)


from sys import stdin, stdout
from bisect import bisect_left as bl
from bisect import bisect_right as br
from heapq import *
from random import *
input = stdin.readline
prin = stdout.write
from random import sample
from collections import Counter, deque
from fractions import *
from math import sqrt, ceil, log2, gcd, cos, pi
mod = 10 ** 9 + 7

def ps(n):
	cp = 0
	lk = 0
	arr = {}
	while n % 2 == 0:
		n = n // 2
		lk += 1
	for ps in range(3, ceil(sqrt(n)) + 1, 2):
		lk = 0
		cc = 0
		while n % ps == 0:
			n = n // ps
			lk += 1
	if n != 1:
		lk += 1
		return False
	return True

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def factorials(n, r):
	slr = n
	dpr = r
	qlr = 1
	qs = 1
	mod = 10 ** 9 + 7
	for ip in range(n - r + 1, n + 1):
		qlr = qlr * ip % mod
	for ij in range(1, r + 1):
		qs = qs * ij % mod
	ans = qlr * modInverse(qs) % mod
	return ans

def modInverse(b):
	qr = 10 ** 9 + 7
	return pow(b, qr - 2, qr)
from types import GeneratorType

def iterative(f, stack=[]):

	def wrapped_func(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		to = f(*args, **kwargs)
		while True:
			if type(to) is GeneratorType:
				stack.append(to)
				to = next(to)
				continue
			stack.pop()
			if not stack:
				break
			to = stack[-1].send(to)
		return to
	return wrapped_func

def power(arr):
	listrep = arr
	subsets = []
	for i in range(2 ** len(listrep)):
		subset = []
		for k in range(len(listrep)):
			if i & 1 << k:
				subset.append(listrep[k])
		subsets.append(subset)
	return subsets

def pda(n):
	list = []
	su = 0
	for i in range(1, int(sqrt(n) + 1)):
		if n % i == 0:
			if n // i == i:
				list.append(i)
				su += i
			else:
				list.append(n // i)
				list.append(i)
				su += i
				su += n // i
	return su

def dis(xa, ya, xb, yb):
	return sqrt((xa - xb) ** 2 + (ya - yb) ** 2)

def ii():
	return int(input())

def ilist():
	return [int(x) for x in input().strip().split()]

def islist():
	return list(map(str, input().split().rstrip()))

def inp():
	return input().strip()

def google(test, ans):
	return 'Case #' + str(test) + ': ' + str(ans)

def overlap(x1, y1, x2, y2):
	if x2 > y1:
		return y1 - x2
	if y1 > y2:
		return y2 - x2
	return y1 - x2

def dist(x1, y1, x2, y2):
	return sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)
t = 1
for p in range(t):
	n = ii()
	a = ii()
	b = ii()
	x = 0
	cc = 0
	while n - x * a >= 0:
		if (n - x * a) % b == 0:
			cc = 1
			print('YES')
			print(x, (n - x * a) // b)
			break
		x += 1
	if cc == 0:
		print('NO')


n = int(input())
a = int(input())
b = int(input())
x = 0
flg = False
while n >= 0:
	if int(n / b) == n / b:
		print('YES')
		print(x, int(n / b))
		flg = True
		break
	n = n - a
	x += 1
if not flg:
	print('NO')


n = int(input())
a = int(input())
b = int(input())
import math

def extgcd(a, b):
	if b == 0:
		return (1, 0, a)
	(q, r) = divmod(a, b)
	(x, y, d) = extgcd(b, r)
	(s, t) = (y, x - q * y)
	return (s, t, d)
g = math.gcd(a, b)
if n % g == 0:
	(x, y, d) = extgcd(a, b)
	i = x * (n // g) // b
	if y * (n // g) + a * i >= 0:
		ans = (x * (n // g) - b * i, y * (n // g) + a * i)
		print('YES')
		print(*ans)
	else:
		print('NO')
else:
	print('NO')


import math
n = int(input())
a = int(input())
b = int(input())
c = max(a, b)
d = min(a, b)
i = 0
flag = 0
gc = math.gcd(c, d)
if n % gc == 0:
	while c * i <= n:
		diff = n - c * i
		if diff % d == 0:
			flag = 1
			print('YES')
			if c == a:
				print(i, diff // d)
			else:
				print(diff // d, i)
			break
		i += 1
if flag == 0:
	print('NO')


def ext_euclid(a, b):
	if b == 0:
		return (1, 0, a)
	else:
		(x, y, q) = ext_euclid(b, a % b)
		(x, y) = (y, x - a // b * y)
		return (x, y, q)
n = int(input())
a = int(input())
b = int(input())
(x, y, d) = ext_euclid(a, b)
if n % d:
	print('NO')
else:
	x *= n // d
	y *= n // d
	a //= d
	b //= d
	if x < 0:
		f = -x // b + (-x % b != 0)
		x += f * b
		y -= f * a
	elif y < 0:
		f = -y // a + (-y % a != 0)
		x -= f * b
		y += f * a
	print(['NO', 'YES\n' + str(x) + '  ' + str(y)][x * y >= 0])


from __future__ import division, print_function
import os
import sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
import collections, itertools, statistics, math
from collections import *
from itertools import *
from statistics import *
from math import *
mod = int(1000000000.0 + 7)
imin = -2147483648
imax = 2147483647
true = True
false = False
none = None
inp = lambda : input()
I = lambda : int(inp())
M = lambda : map(int, inp().split())
L = lambda : list(M())
Yes = lambda : print('Yes')
No = lambda : print('No')
YES = lambda : print('YES')
NO = lambda : print('NO')

def IO():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def true_yes(statement):
	return YES() if statement else NO()

def kabraji_ka_totka():
	n = I()
	a = I()
	b = I()
	count = 0
	while n >= 0 and n % b != 0:
		n -= a
		count += 1
	result = ['YES\n' + str(count), n // b]
	NO = ['NO']
	print(*(result if n >= 0 else NO))
kabraji_ka_totka()


from fractions import gcd
n = int(input())
a = int(input())
b = int(input())
p = gcd(a, b)
if n % p == 0:
	a1 = n // a
	b1 = n // b
	if n % a == 0 or n % b == 0:
		print('YES')
		if n % a == 0:
			print(a1, 0)
		else:
			print(0, b1)
	elif a + b > n:
		print('NO')
	else:
		v = n - a1 * a
		b1 = v // b
		while a1 * a + b1 * b != n:
			a1 -= 1
			v = n - a1 * a
			b1 = v // b
		if a1 < 0 or b1 < 0:
			print('NO')
		else:
			print('YES')
			print(a1, b1)
else:
	print('NO')


n = int(input())
a = int(input())
b = int(input())
x = 0
r = False
while x * a <= n:
	z = (n - x * a) / b
	if z >= 0 and z == int(z):
		r = True
		break
	x += 1
if r:
	print('YES')
	print(x, int(z))
else:
	print('NO')


n = int(input())
a = int(input())
b = int(input())

def greater(a, b):
	if a > b:
		return [a, b]
	else:
		return [b, a]

def ans(n, a, b):
	if n % a == 0:
		print('YES')
		print(n // a, 0)
		return
	if n % b == 0:
		print('YES')
		print(0, n // b)
		return
	if a == b:
		print('NO')
		return
	if a % b == 0 or b % a == 0:
		print('NO')
		return
	if n % 2 != 0 and a % 2 == 0 and (b % 2 == 0):
		print('NO')
		return
	l = greater(a, b)[1]
	g = greater(a, b)[0]
	p = 0
	while n - p * g >= 0:
		q = (n - p * g) / l
		if q - int(q) == 0:
			print('YES')
			if g == a:
				print(p, int(q))
			else:
				print(int(q), p)
			return
		p += 1
	print('NO')
	return
ans(n, a, b)


c = int(input())
a = int(input())
b = int(input())
flag1 = 0
if b > a:
	flag1 = 1
	(a, b) = (b, a)
i = 0
flag = 1
while i * a <= c:
	if (c - i * a) % b == 0:
		print('YES')
		if flag1:
			print((c - a * i) // b, i)
		else:
			print(i, (c - a * i) // b)
		flag = 0
		break
	i += 1
if flag:
	print('NO')


import math

def solve(n, a, b):
	if n % a == 0:
		return (n // a, 0)
	elif n % b == 0:
		return (0, n // b)
	else:
		for i in range(1, n // a + 1):
			if (n - a * i) % b == 0:
				return (i, (n - a * i) // b)
		return (-1, -1)
(n, a, b) = (int(input()) for _ in 'nab')
if n % math.gcd(a, b) > 0 or (a > n and b > n):
	print('NO')
else:
	if a > b:
		(q, p) = solve(n, a, b)
	else:
		(p, q) = solve(n, b, a)
	if q == -1:
		print('NO')
	else:
		print('YES')
		print(q, p)


def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)
n = int(input())
a = int(input())
b = int(input())
g = gcd(a, b)
if n % g != 0:
	print('NO')
elif n % a == 0:
	print('YES')
	print(n // a, 0)
elif n % b == 0:
	print('YES')
	print(0, n // b)
else:
	f = -1
	ans = 0
	while n > 1:
		n -= b
		ans += 1
		if n < 0:
			break
		if n % a == 0:
			f = 1
			print('YES')
			print(n // a, ans)
			break
	if f == -1:
		print('NO')


n = int(input())
a = int(input())
b = int(input())
if n % 2 != 0 and a % 2 == 0 and (b % 2 == 0):
	print('NO')
elif a == n or n % a == 0:
	print('YES')
	print(n // a, 0, end=' ')
elif b == n or n % b == 0:
	print('YES')
	print(0, n // b, end=' ')
elif a == b:
	if n % a != 0:
		print('NO')
else:
	m = min(n // a, n // b)
	f = 0
	for i in range(1, m + 1):
		if (n - a * i) % b == 0:
			f = 1
			print('YES')
			print(i, (n - a * i) // b, end=' ')
			break
		elif (n - b * i) % a == 0:
			f = 1
			print('YES')
			print((n - b * i) // a, i, end=' ')
			break
	if f == 0:
		print('NO')


(n, a, b) = [int(input()) for i in range(3)]
if a > b:
	x = 0
	y = -1
	while x * a <= n:
		if (n - x * a) % b == 0:
			y = (n - x * a) // b
			break
		x += 1
	print('YES\n{} {}'.format(x, y) if y != -1 else 'NO')
else:
	x = -1
	y = 0
	while y * b <= n:
		if (n - y * b) % a == 0:
			x = (n - y * b) // a
			break
		y += 1
	print('YES\n{} {}'.format(x, y) if x != -1 else 'NO')


n = int(input())
a = int(input())
b = int(input())
y = 0
while n % a != 0 and n >= 0:
	n -= b
	y += 1
if n < 0:
	print('NO')
else:
	print('YES')
	print(n // a, y)


n = int(input())
a = int(input())
b = int(input())
f = False
if a == b and n % a != 0:
	print('NO')
elif a > b:
	for i in range(n // a + 1):
		if (n - a * i) % b == 0:
			f = True
			x = i
			y = (n - a * i) // b
			break
	if f:
		print('YES')
		print(x, y)
	else:
		print('NO')
else:
	for i in range(n // b + 1):
		if (n - b * i) % a == 0:
			f = True
			x = i
			y = (n - b * i) // a
			break
	if f:
		print('YES')
		print(y, x)
	else:
		print('NO')


from math import gcd

def xgcd(a, b):
	(x0, x1, y0, y1) = (0, 1, 1, 0)
	while a != 0:
		(q, b, a) = (b // a, a, b % a)
		(y0, y1) = (y1, y0 - q * y1)
		(x0, x1) = (x1, x0 - q * x1)
	return (b, x0, y0)
n = int(input())
a = int(input())
b = int(input())
if n % gcd(a, b) == 0:
	(g, x, y) = xgcd(a, b)
	lcm = a * b // g
	x *= n // g
	y *= n // g
	if x < 0:
		change = -(x // (lcm // a))
		x += lcm // a * change
		y -= lcm // b * change
	elif y < 0:
		change = -(y // (lcm // b))
		x -= lcm // a * change
		y += lcm // b * change
	if x < 0 or y < 0:
		print('NO')
	else:
		print('YES')
		print(x, y)
else:
	print('NO')


n = int(input())
a = int(input())
b = int(input())
first = n
if n % a == 0:
	print('YES')
	print(n // a, 0)
elif n % b == 0:
	print('YES')
	print(0, n // b)
else:
	while n % a and n > 0:
		n -= b
	if n < 0:
		print('NO')
	else:
		print('YES')
		print(n // a, (first - n) // b)


n = int(input())
a = int(input())
b = int(input())
for i in range(0, n // min(a, b) + 1):
	t = n - i * a
	if t % b == 0 and t >= 0:
		ans = 'YES'
		val = [i, t // b]
		break
	else:
		ans = 'NO'
if ans == 'NO':
	print('NO')
else:
	print(ans)
	print(*val)


def main():
	(n, a, b) = (int(input()), int(input()), int(input()))
	l = [False] * (n + 1)
	l[n % a::a] = [True] * (n // a + 1)
	try:
		i = l[::b].index(True)
		print(f'YES\n{(n - i * b) // a} {i}')
	except ValueError:
		print('NO')
main()


n = int(input())
a = int(input())
b = int(input())
sw = 0
if b > a:
	(a, b) = (b, a)
	sw = 1
ans = 'NO'
for i in range(n // a + 1):
	if (n - i * a) % b == 0:
		ans = 'YES'
		break
print(ans)
if ans == 'YES':
	if sw:
		print((n - i * a) // b, i)
	else:
		print(i, (n - i * a) // b)


import sys, os, io
from sys import stdin
from math import log, gcd, ceil
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import math
alphabets = list('abcdefghijklmnopqrstuvwxyz')

def isPrime(x):
	for i in range(2, x):
		if i * i > x:
			break
		if x % i == 0:
			return False
	return True

def ncr(n, r, p):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p

def primeFactors(n):
	l = []
	while n % 2 == 0:
		l.append(2)
		n = n / 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			l.append(int(i))
			n = n / i
	if n > 2:
		l.append(n)
	return list(set(l))

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def SieveOfEratosthenes(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime

def countdig(n):
	c = 0
	while n > 0:
		n //= 10
		c += 1
	return c

def si():
	return input()

def prefix_sum(arr):
	r = [0] * (len(arr) + 1)
	for (i, el) in enumerate(arr):
		r[i + 1] = r[i] + el
	return r

def divideCeil(n, x):
	if n % x == 0:
		return n // x
	return n // x + 1

def ii():
	return int(input())

def li():
	return list(map(int, input().split()))

def ws(s):
	sys.stdout.write(s + '\n')

def wi(n):
	sys.stdout.write(str(n) + '\n')

def wia(a):
	sys.stdout.write(' '.join([str(x) for x in a]) + '\n')

def power_set(L):
	cardinality = len(L)
	n = 2 ** cardinality
	powerset = []
	for i in range(n):
		a = bin(i)[2:]
		subset = []
		for j in range(len(a)):
			if a[-j - 1] == '1':
				subset.append(L[j])
		powerset.append(subset)
	powerset_orderred = []
	for k in range(cardinality + 1):
		for w in powerset:
			if len(w) == k:
				powerset_orderred.append(w)
	return powerset_orderred

def fastPlrintNextLines(a):
	print('\n'.join(map(str, a)))

def sortByFirstAndSecond(A):
	A = sorted(A, key=lambda x: x[0])
	A = sorted(A, key=lambda x: x[1])
	return list(A)
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
else:
	input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
t = 1
for _ in range(t):
	n = ii()
	a = ii()
	b = ii()
	f = 0
	for x in range(n + 1):
		by = n - a * x
		if by % b == 0 and by >= 0:
			print('YES')
			print(x, by // b)
			f = 1
			break
	if f == 0:
		print('NO')


def gcd(a, b):
	while b:
		(a, b) = (b, a % b)
	return a
n = int(input())
a = int(input())
b = int(input())
i = 0
if n % gcd(a, b) != 0:
	print('NO')
elif a > b:
	while i * a <= n:
		if (n - i * a) % b == 0:
			print('YES')
			print(i, (n - i * a) // b)
			exit(0)
		else:
			i += 1
	print('NO')
else:
	while i * b <= n:
		if (n - i * b) % a == 0:
			print('YES')
			print((n - i * b) // a, i)
			exit(0)
		else:
			i += 1
	print('NO')


n = int(input())
a = int(input())
b = int(input())
x = 0
y = 0
impossible = False
if a == 1 or (a == 2 and n % 2 == 0):
	print('YES')
	print(int(n / a), 0)
	exit()
if b == 1 or (b == 2 and n % 2 == 0):
	print('YES')
	print(0, int(n / b))
	exit()
if n % 2 != 0 and a % 2 == 0 and (b % 2 == 0):
	impossible = True
while True:
	ax = a * x
	nax = n - ax
	y = nax / b
	if (y % 1 == 0 or ax == n) and y > -1:
		print('YES')
		print(x, int(y))
		exit()
	x += 1
	if n >= 9999998:
		if n % 2 != a % 2 and n % 2 != b % 2:
			impossible = True
		if n == 10000000 and 100 / int(str(a)[:2]) % 1 != 0 and (100 / int(str(b)[:2]) % 1 != 0):
			impossible = True
	if 10000000 / (a + b) % 2 == 0 and n == 10000000:
		impossible = False
	if y < 0 or impossible:
		print('NO')
		exit()


n = int(input())
a = int(input())
b = int(input())
bc = 0
while n >= 0:
	if int(n / b) == n / b:
		print('YES')
		print(bc, int(n / b))
		return
	n = n - a
	bc += 1
print('NO')


import sys, os, time
from math import log, gcd
mod = 1000000007
mod1 = 998244353

def intinp():
	return int(sys.stdin.readline())

def strinp():
	return sys.stdin.readline()

def arrinp():
	return list(map(int, sys.stdin.readline().strip().split()))

def mulinp():
	return map(int, sys.stdin.readline().strip().split())

def flush():
	return sys.stdout.flush()

def power_two(x):
	return 1 << x

def lcm(a, b):
	return a * b // gcd(a, b)

def power(a, n):
	res = 1
	while n:
		if n & 1:
			res = res % mod * a % mod % mod
			n -= 1
		else:
			a = a % mod * a % mod % mod
			n = n // 2
	return res

def isnotsubseq(s1, s2):
	j = 0
	(n, m) = (len(s1), len(s2))
	for i in range(0, m):
		if s1[j] == s2[i]:
			j += 1
		if j == n:
			return False
	return True

def variable(n, a, b):
	i = 0
	while i * a <= n:
		if (n - i * a) % b == 0:
			return (i, (n - i * a) // b)
		i += 1
	return (None, None)

def sol():
	n = intinp()
	a = intinp()
	b = intinp()
	if n % gcd(a, b) != 0:
		print('NO')
		return
	(x, y) = variable(n, a, b)
	if x == None or y == None:
		print('NO')
		return
	print('YES')
	print(x, y)

def main():
	tc = 1
	while tc:
		sol()
		tc -= 1
main()


import sys, math, string, bisect
input = sys.stdin.readline
from collections import deque
L = lambda : list(map(int, input().split()))
Ls = lambda : list(input().split())
M = lambda : map(int, input().split())
I = lambda : int(input())
n = I()
a = I()
b = I()
if n % math.gcd(a, b):
	print('NO')
else:
	if n % b == 0:
		print('YES')
		print(0, n // b)
		exit()
	i = 0
	while n > 0:
		if n % a == 0:
			print('YES')
			print(n // a, i)
			exit()
		n -= b
		i += 1
	print('NO')


import sys
import collections
from collections import Counter
import itertools
import math
import timeit

def sieve(n):
	if n < 2:
		return list()
	prime = [True for _ in range(n + 1)]
	p = 3
	while p * p <= n:
		if prime[p]:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 2
	r = [2]
	for p in range(3, n + 1, 2):
		if prime[p]:
			r.append(p)
	return r

def divs(n, start=1):
	divisors = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				divisors.append(i)
			else:
				divisors.extend([i, n // i])
	return divisors

def divn(n, primes):
	divs_number = 1
	for i in primes:
		if n == 1:
			return divs_number
		t = 1
		while n % i == 0:
			t += 1
			n //= i
		divs_number *= t

def flin(d, x, default=-1):
	left = right = -1
	for i in range(len(d)):
		if d[i] == x:
			if left == -1:
				left = i
			right = i
	if left == -1:
		return (default, default)
	else:
		return (left, right)

def ceil(n, k):
	return n // k + (n % k != 0)

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(map(int, input().split()))

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def prr(a, sep=' '):
	print(sep.join(map(str, a)))

def dd():
	return collections.defaultdict(int)

def ddl():
	return collections.defaultdict(list)
n = ii()
a = ii()
b = ii()
x = 0
while n - x * a >= 0:
	if not (n - x * a) % b:
		print('YES')
		exit(print(x, (n - x * a) // b))
	x += 1
print('NO')


n = int(input())
a = int(input())
b = int(input())
i = 0
while True:
	if n - a * i < 0:
		print('NO')
		exit()
	elif (n - a * i) % b == 0:
		print('YES')
		print(i, (n - a * i) // b)
		exit()
	i += 1


n = int(input())
x = int(input())
y = int(input())
wins = 0
i = 0
while n >= x * i:
	if (n - x * i) % y == 0:
		wins = 1
		break
	i += 1
if wins == 1:
	print('YES')
	print(i, (n - x * i) // y)
else:
	print('NO')


n = int(input())
m = int(input())
k = int(input())
c = 0
while n >= 0 and n % k != 0:
	n = n - m
	c += 1
if n >= 0:
	print('YES')
	print(c, n // k)
else:
	print('NO')


from sys import stdin, stdout
import math
import heapq
from itertools import accumulate
N = int(input())
A = int(input())
B = int(input())

def GCD(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
gcd = GCD(A, B)
if N % gcd != 0:
	print('NO')
	quit()
if A == 1:
	print('YES')
	print(N, 0)
	quit()
if B == 1:
	print('YES')
	print(0, N)
	quit()
if A >= B:
	for i in range(N // A + 1):
		num = N - A * i
		if num % B == 0:
			print('YES')
			print(i, num // B)
			quit()
else:
	for i in range(N // B + 1):
		num = N - B * i
		if num % A == 0:
			print('YES')
			print(num // A, i)
			quit()
print('NO')


n = int(input())
a = int(input())
b = int(input())
ZZ = {'x': 0, 'y': 0}
ans = ['x', 'y']
if a < b:
	(ans[0], ans[1]) = (ans[1], ans[0])
	(a, b) = (b, a)
if a * b > n:
	for i in range(n // a + 1):
		if (n - a * i) % b == 0:
			ZZ['x'] = i
			ZZ['y'] = (n - a * i) // b
			break
elif a * b == n:
	ZZ['x'] = b
	ZZ['y'] = 0
else:
	for i in range(b + 1):
		if (n - a * i) % b == 0:
			ZZ['x'] = i
			ZZ['y'] = (n - a * i) // b
if ZZ['x'] == 0 and ZZ['y'] == 0:
	print('NO')
else:
	print('YES')
	for i in ans:
		print(ZZ[i], end=' ')


n = int(input())
a = int(input())
b = int(input())
ma = max(a, b)
mi = min(a, b)
nma = 0
if n % a == 0:
	print('YES')
	print(str(int(n / a)), ' 0')
elif n % b == 0:
	print('YES')
	print('0 ', str(int(n / b)))
elif a % 2 == 0 and b % 2 == 0 and (n % 2 != 0):
	print('NO')
elif a == b and n % a != 0:
	print('NO')
else:
	while n - ma >= 0:
		nma += 1
		n -= ma
		if n % mi == 0:
			print('YES')
			if ma == a:
				print(str(nma), ' ', str(int(n / mi)))
			else:
				print(str(int(n / mi)), ' ', str(nma))
			n = -9999999
			break
	if n != -9999999:
		print('NO')


def main():
	N = int(input())
	a = int(input())
	b = int(input())
	for i in range(0, N // a + 1):
		if (N - i * a) % b == 0 and N - i * a > -1:
			print('YES')
			print(i, (N - i * a) // b)
			return
	print('NO')
main()


import sys
import math as mt
import bisect
input = sys.stdin.readline
t = 1

def solve():
	if a == b == 1:
		print('YES')
		print(n, 0)
		return
	else:
		maxi = max(a, b)
		i = 0
		while i <= n:
			if (n - i) % b == 0:
				print('YES')
				print(i // a, (n - i) // b)
				return
			i += a
	print('NO')
for _ in range(t):
	n = int(input())
	a = int(input())
	b = int(input())
	solve()


def h(m, n):
	while n:
		(m, n) = (n, m % n)
	return m
n = int(input())
a = int(input())
b = int(input())
hh = h(a, b)
s = 0
if n % hh != 0:
	print('NO')
elif a > b:
	c = n // a
	for i in range(0, c + 1):
		d = n - a * i
		e = d // b
		f = d % b
		if f == 0:
			B = e
			A = i
			s += 1
			print('YES')
			break
	if s != 0:
		print(A, end=' ')
		print(B)
	else:
		print('NO')
elif a < b:
	c = n // b
	for i in range(0, c + 1):
		d = n - b * i
		e = d // a
		f = d % a
		if f == 0:
			A = e
			B = i
			s += 1
			print('YES')
			break
	if s != 0:
		print(A, end=' ')
		print(B)
	else:
		print('NO')
elif n % a == 0:
	print('YES')
	print(int(n / a), end=' ')
	print(0)
else:
	print('NO')


(c, a, b) = (int(input()), int(input()), int(input()))
(a1, b1) = (max(a, b), min(a, b))
while max(a1, b1) % min(a1, b1) != 0:
	a1 = a1 - a1 // b1 * b1
	if b1 > a1:
		(a1, b1) = (b1, a1)
if c % min(a1, b1) != 0:
	print('NO')
else:
	for x in range(c // max(a, b) + 1):
		if a > b:
			y = (c - x * a) / b
		else:
			y = (c - x * b) / a
		if int(y) == y and y >= 0:
			print('YES')
			if a > b:
				print(x, ' ', int(y))
			else:
				print(int(y), ' ', x)
			break
	else:
		print('NO')


n = int(input())
a = int(input())
b = int(input())
d = n // a
rem = n % a
while rem % b != 0 and d >= 0:
	d = d - 1
	rem = rem + a
if d < 0:
	print('NO')
else:
	print('YES')
	print(d, rem // b)