#include <bits/stdc++.h>
using namespace std;
long long n, p, w, d;
long long x, y;
long long exgcd(long long a, long long b, long long &x, long long &y) {
  if (b == 0) {
    x = 1;
    y = 0;
    return a;
  }
  long long r = exgcd(b, a % b, y, x);
  y -= x * (a / b);
  return r;
}
signed main() {
  cin >> n >> p >> w >> d;
  long long temp = exgcd(w, d, x, y);
  if (p % temp != 0) {
    printf("-1");
    return 0;
  }
  long long t1 = p / temp;
  long long m = w / temp;
  t1 %= w;
  y *= t1;
  if (y < 0) y -= (y / m) * m;
  y = (y + m) % m;
  x = (p - (y * d)) / w;
  if (x < 0 || x + y > n)
    printf("-1");
  else
    printf("%lld %lld %lld", x, y, n - x - y);
  return 0;
}
