#include <bits/stdc++.h>
using namespace std;
double S = 0.0;
double a = 0.0;
double b = 0.0;
double c = 0.0;
double dist(double lx, double ly, double lz) {
  return a * lx + b * ly + c * lz;
}
double part3(double x) {
  double l = 0.0;
  double r = S - x;
  double lx = log(x);
  for (int times = 0; times < 100; times++) {
    double midl = l + (r - l) / 3.0;
    double midr = r - (r - l) / 3.0;
    if (dist(lx, log(midl), log(S - x - midl)) >
        dist(lx, log(midr), log(S - x - midr)))
      r = midr;
    else
      l = midl;
  }
  return l;
}
int main(void) {
  scanf("%lf %lf %lf %lf", &S, &a, &b, &c);
  double l = 0.0;
  double r = S;
  for (int times = 0; times < 100; times++) {
    double midl = l + (r - l) / 3.0;
    double midr = r - (r - l) / 3.0;
    double ll = part3(midl);
    double rr = part3(midr);
    if (dist(log(midl), log(ll), log(S - midl - ll)) >
        dist(log(midr), log(rr), log(S - midr - rr)))
      r = midr;
    else
      l = midl;
  }
  double ay = part3(l);
  printf("%.9f %.9f %.9f\n", l, ay, S - l - ay - 1e-9);
  while (getchar() != EOF)
    ;
  return 0;
}
