n, a, b = int(input()), int(input()), int(input())
o = 0
for x in range(n+1):
y = (n - (x*a))/b
if y.is_integer() == True and y >= 0:
o += 1
print("YES")
print(x, int(y))
break
if o != 1:
print("NO")
#include <bits/stdc++.h>
#include <numeric>
using namespace std;
using namespace std;
#define Gh ::sync_with_stdio(0); cin.tie(0); cout.tie(0);
typedef long long ll;
typedef vector<int> vi;
typedef vector< vector<int>> vov;
typedef vector<ll> vl;
typedef pair<int, int> pi;
#define F first
#define S second
#define PB push_back
#define loop(i,a,b) for (int i = a; i < b; i++)
#define endl "\n"
#define NO cout <<"NO\n"
#define YES cout << "YES\n"
#define nax 100005
#define LFT p<<1, L, (L+R)>>1
#define RGT p<<1|1, ((L+R)>>1)+1, R
#define all(x) x.begin(), x.end()
#define rall(v) v.rbegin(), v.rend()
#define dmid ll mid = L + ((R - L ) >> 1);
#define T int t; cin >> t; while (t--)
ll M = 1000000007;
ll mod(ll x) {
return ((x % M + M) % M);
}
ll mul(ll a, ll b) {
return mod(mod(a) * mod(b));
}
ll add(ll a, ll b) {
return mod(mod(a) + mod(b));
}
ll dec(ll a, ll b) {
return mod(mod(a) - mod(b));
}
int main()
{
ll f = 0, n, a, b,x,y,s=0;
cin >> n >> a >> b; if (b > a){swap(a, b);s=1;}
for (ll i = 0; i < b; i++)
{
if ((n - a * i) % b == 0)
{
x = i;y=(n - a * i) / b;
f = 1;
break;
}
}
if (f == 0||x<0||y<0)NO;
else if(s) {
YES;
cout << y << " " << x;
}
else {
YES;
cout << x << " " << y;
}
return 0;
}
50. Pow(x, n) | 43. Multiply Strings |
34. Find First and Last Position of Element in Sorted Array | 33. Search in Rotated Sorted Array |
17. Letter Combinations of a Phone Number | 5. Longest Palindromic Substring |
3. Longest Substring Without Repeating Characters | 1312. Minimum Insertion Steps to Make a String Palindrome |
1092. Shortest Common Supersequence | 1044. Longest Duplicate Substring |
1032. Stream of Characters | 987. Vertical Order Traversal of a Binary Tree |
952. Largest Component Size by Common Factor | 212. Word Search II |
174. Dungeon Game | 127. Word Ladder |
123. Best Time to Buy and Sell Stock III | 85. Maximal Rectangle |
84. Largest Rectangle in Histogram | 60. Permutation Sequence |
42. Trapping Rain Water | 32. Longest Valid Parentheses |
Cutting a material | Bubble Sort |
Number of triangles | AND path in a binary tree |
Factorial equations | Removal of vertices |
Happy segments | Cyclic shifts |