#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long n, p, d, w;
  cin >> n >> p >> w >> d;
  long long c = min(p / w, n);
  if (w == 6 && d == 3) {
    cout << -1;
    return 0;
  }
  for (long long i = c; i >= 0; i--)
    if ((p - i * w) % d == 0 && ((p - i * w) / d + i) <= n) {
      cout << i << " " << (p - i * w) / d << " " << n - i - (p - i * w) / d;
      return 0;
    } else if (((p - i * w) / d + i) > n) {
      cout << -1;
      return 0;
    }
  cout << -1;
  return 0;
}
