#include <bits/stdc++.h>
using namespace std;
const long long N = 1e7;
vector<long long> primes;
vector<long long> p(N, 1);
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, p, w, d;
  cin >> n >> p >> w >> d;
  long long l = 0, r = n;
  while (r - l > 10000000) {
    long long wins = (l + r) / 2;
    if (w * wins > p) {
      r = wins - 1;
      continue;
    }
    long long draws = (p - (wins * w)) / d;
    if (draws < 0) {
      l = wins + 1;
      continue;
    }
    long long points = w * wins + d * draws;
    cerr << wins << " " << draws << " " << points << '\n';
    if (points == p) {
      if (wins + draws <= n) {
        cout << wins << " " << draws << " " << n - wins - draws << '\n';
        return 0;
      } else {
        l = wins + 1;
      }
    } else {
      if (points < p) {
        l = wins + 1;
      } else {
        r = wins - 1;
      }
    }
  }
  for (long long wins = l; wins <= r; wins++) {
    if (w * wins > p) {
      continue;
    }
    long long draws = (p - (wins * w)) / d;
    if (draws < 0) {
      continue;
    }
    long long points = w * wins + d * draws;
    if (points == p) {
      if (wins + draws <= n) {
        cout << wins << " " << draws << " " << n - wins - draws << '\n';
        return 0;
      }
    }
  }
  cout << -1 << '\n';
  return 0;
}
