#include <bits/stdc++.h>
using namespace std;
long long int X, Y;
void modinverse(long long int a, long long int b) {
  if (b == 0) {
    X = 1;
    Y = 0;
    return;
  }
  modinverse(b, a % b);
  long long int cx = Y;
  long long int cy = X - (a / b) * Y;
  X = cx;
  Y = cy;
}
long long int gcd(long long int a, long long int b) {
  return b == 0 ? a : gcd(b, a % b);
}
void solve() {
  long long int n, p, w, d;
  cin >> n >> p >> w >> d;
  long long int g = gcd(w, d);
  if (p % g) {
    cout << -1 << endl;
    return;
  }
  w /= g;
  d /= g;
  p /= g;
  modinverse(d, w);
  if (X < 0) {
    X += w;
  }
  long long int y = ((p % w) * (X % w)) % w;
  long long int x = (p - y * d) / w;
  if (x + y > n) {
    cout << -1 << endl;
    return;
  }
  if (x < 0) {
    cout << -1 << endl;
    return;
  }
  long long int z = n - (x + y);
  cout << x << " " << y << " " << z << endl;
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie();
  cout.tie(0);
  long long int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
