#include <bits/stdc++.h>
using namespace std;
long long mulmod(long long a, long long b, long long c) {
  long long sign = 1;
  if (a < 0) {
    a = -a;
    sign = -sign;
  }
  if (b < 0) {
    b = -b;
    sign = -sign;
  }
  a %= c;
  b %= c;
  long long res = 0;
  while (b > 0) {
    if (b & 1) res = (res + a) % c;
    a = (a + a) % c;
    b >>= 1;
  }
  if (sign == -1) res = (-res) % c;
  return res;
}
long long extgcd(long long a, long long b, long long &x, long long &y) {
  if (a == 0) {
    x = 0;
    y = 1;
    return b;
  }
  long long p = b / a;
  long long g = extgcd(b - p * a, a, y, x);
  x -= p * y;
  return g;
}
bool diophantine(long long a, long long b, long long c, long long &x,
                 long long &y, long long &g) {
  if (a == 0 && b == 0) {
    if (c == 0) {
      x = y = g = 0;
      return true;
    }
    return false;
  }
  if (a == 0) {
    if (c % b == 0) {
      x = 0;
      y = c / b;
      g = abs(b);
      return true;
    }
    return false;
  }
  if (b == 0) {
    if (c % a == 0) {
      x = c / a;
      y = 0;
      g = abs(a);
      return true;
    }
    return false;
  }
  g = extgcd(a, b, x, y);
  if (c % g != 0) {
    return false;
  }
  long long dx = c / a;
  c -= dx * a;
  long long dy = c / b;
  c -= dy * b;
  x = dx + mulmod(x, c / g, b);
  y = dy + mulmod(y, c / g, a);
  g = abs(g);
  return true;
}
bool all_diophantine(long long a, long long b, long long c, long long &x,
                     long long &y, long long &g, long long &lowest_x_nn,
                     long long &lowest_y_nn, long long &lowest_x_pos,
                     long long &lowest_y_pos) {
  long long aa, bb, t;
  bool possible = diophantine(a, b, c, x, y, g);
  if (possible) {
    aa = a / g;
    bb = b / g;
    t = y / aa;
    if (y < 0 && y % aa) t--;
    lowest_y_nn = y - t * aa;
    t = x / bb;
    if (x > 0 && x % bb) t--;
    lowest_x_nn = x + t * bb;
  }
  return possible;
}
int main() {
  long long i, j, k, l, n, m, tot, temp, curr, val, prev, a, b, c, t, ans, flag,
      x, y, siz, ii, jj, xx, yy, ind, len, q, dd, ww, d, p, w, z, g, aa, bb;
  long long lowest_x_nn, lowest_y_nn, lowest_x_pos, lowest_y_pos;
  cin >> n >> p >> w >> d;
  ans = all_diophantine(w, d, p, x, y, g, lowest_x_nn, lowest_y_nn,
                        lowest_x_pos, lowest_y_pos);
  if (ans) {
    y = lowest_y_nn;
    x = (p - d * y) / w;
    z = n - x - y;
    if (x >= 0 && y >= 0 && z >= 0) {
      cout << x << " " << y << " " << z << endl;
      return 0;
    }
  }
  cout << -1 << endl;
}
