#include <bits/stdc++.h>
using namespace std;
int read() {
  int f = 1, x = 0;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -f;
    c = getchar();
  }
  while (c >= '0' && c <= '9') x = x * 10 + c - '0', c = getchar();
  return f * x;
}
long long n, p, w, d;
long long extgcd(long long a, long long b, long long &x, long long &y) {
  if (b == 0) {
    x = 1, y = 0;
    return a;
  } else {
    long long d = extgcd(b, a % b, y, x);
    y -= (a / b) * x;
    return d;
  }
}
void init() { cin >> n >> p >> w >> d; }
void solve() {
  long long xx, yy;
  long long dd = extgcd(w, d, xx, yy);
  if (p % dd != 0) {
    printf("-1\n");
    return;
  } else {
    long long ww = w / dd, d_ = d / dd;
    long long xx1 = (xx * ((p / dd) % d_) % d_ + d_) % d_,
              yy1 = (p - w * xx1) / d;
    if (xx1 >= 0 && yy1 >= 0 && xx1 + yy1 <= n) {
      printf("%I64d %I64d %I64d\n", xx1, yy1, n - xx1 - yy1);
      return;
    }
    long long yy2 = (yy * ((p / dd) % ww) % ww + ww) % ww,
              xx2 = (p - d * yy2) / w;
    if (xx2 >= 0 && yy2 >= 0 && xx2 + yy2 <= n) {
      printf("%I64d %I64d %I64d\n", xx2, yy2, n - xx2 - yy2);
      return;
    }
  }
  printf("-1\n");
  return;
}
int main() {
  init();
  solve();
  return 0;
}
