#include <bits/stdc++.h>
using namespace std;
inline long long llread() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (!('0' <= ch && ch <= '9')) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while ('0' <= ch && ch <= '9') x = x * 10 + ch - '0', ch = getchar();
  return x * f;
}
long long N, P, W, D, x, y, z;
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 gcd = exgcd(b, a % b, y, x);
  y -= a / b * x;
  return gcd;
}
inline long long inv(long long x, long long mod) {
  long long xx, yy;
  long long gcd = exgcd(x, mod, xx, yy);
  return (xx % mod + mod) % mod;
}
int main() {
  N = llread(), P = llread(), W = llread(), D = llread();
  long long gcd = exgcd(W, D, x, y);
  if (P % gcd != 0) {
    printf("-1\n");
    return 0;
  }
  P /= gcd, W /= gcd, D /= gcd;
  y = P % W * inv(D, W) % W;
  x = (P - y * D) / W;
  if (x < 0 || x + y > N) {
    printf("-1\n");
    return 0;
  }
  printf("%lld %lld %lld\n", x, y, N - x - y);
  return 0;
}
