#include <bits/stdc++.h>
using namespace std;
template <typename _t>
inline void read(_t &x) {
  x = 0;
  _t fu = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') fu = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = (x << 3) + (x << 1) + (ch & 15);
    ch = getchar();
  }
  x *= fu;
}
long long gcd(long long a, long long b) { return !b ? a : gcd(b, a % b); }
void exgcd(long long a, long long b, long long &x, long long &y) {
  if (b == 0) {
    x = 1;
    y = 0;
    return;
  }
  exgcd(b, a % b, y, x);
  y -= x * (a / b);
}
long long fun(long long x, long long M) { return (x % M + M) % M; }
int main() {
  long long n, p, w, d;
  scanf("%lld%lld%lld%lld", &n, &p, &w, &d);
  long long gcdd = gcd(w, d);
  if (p % gcdd)
    puts("-1");
  else {
    long long x, y;
    p /= gcdd;
    w /= gcdd;
    d /= gcdd;
    exgcd(w, d, x, y);
    x = fun(fun(x, d) * fun(p, d), d);
    y = fun(fun(y, w) * fun(p, w), w);
    long long now = x * w + y * d;
    if (now > p)
      puts("-1");
    else {
      x += (p - now) / w;
      if (x + y > n)
        puts("-1");
      else
        printf("%lld %lld %lld\n", x, y, n - x - y);
    }
  }
  return 0;
}
