#include <bits/stdc++.h>
using namespace std;
int cansel_sync = (ios::sync_with_stdio(0), cin.tie(0), 0);
void Exgcd(long long a, long long b, long long &d, long long &x, long long &y) {
  if (!b) {
    d = a;
    x = 1;
    y = 0;
  } else {
    Exgcd(b, a % b, d, y, x);
    y -= x * (a / b);
  }
}
long long n, p, w, d;
void solve() {
  cin >> n >> p >> w >> d;
  long long ttx = p / w;
  long long ys = p % w;
  long long tty = ys / d;
  ys = ys % d;
  long long gcdd, xx, yy;
  Exgcd(w, d, gcdd, xx, yy);
  long long bs = ys / gcdd;
  if (ys % gcdd != 0) {
    cout << -1 << endl;
    return;
  }
  long long tx = bs * xx + ttx;
  long long ty = bs * yy + tty;
  while (tx < 0) {
    ty -= w / gcdd;
    tx += d / gcdd;
  }
  while (ty < 0) {
    ty += w / gcdd;
    tx -= d / gcdd;
  }
  if (tx + ty <= n && tx >= 0 && ty >= 0) {
    cout << tx << ' ' << ty << ' ' << n - tx - ty << endl;
  } else
    cout << -1 << endl;
}
int main() { solve(); }
