#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, p, w, d;
  scanf("%lld %lld", &n, &p);
  scanf("%lld %lld", &w, &d);
  for (long long x = 0, y = 0; x <= 100000; x++, y++) {
    if (p >= x * w and (p - x * w) % d == 0) {
      if ((p - x * w) / d + x <= n)
        printf("%lld %lld %lld\n", x, (p - x * w) / d, n - x - (p - x * w) / d),
            exit(0);
    }
    if (p >= y * d and (p - y * d) % w == 0) {
      if ((p - y * d) / w + y <= n)
        printf("%lld %lld %lld\n", (p - y * d) / w, y, n - (p - y * d) / w - y),
            exit(0);
    }
  }
  printf("-1\n");
  return 0;
}
