#include <bits/stdc++.h>
using namespace std;
double s, a, b, c, x, y, z, l, e, r, ll, rr, maxx, yk;
double logg(double x, double a) {
  if (x < 1e-8 && fabs(a) < 1e-8) return 1;
  if (x < 1e-8) return -1e12;
  return a * log(x);
}
double ff(double x, double y) {
  z = s - y - x;
  e = logg(x, a) + logg(y, b) + logg(z, c);
  return e;
}
double f(double x) {
  rr = s - x;
  ll = 0;
  for (int i = 1; i <= 300; i++) {
    double m11 = ll + (rr - ll) / 3;
    double m22 = rr - (rr - ll) / 3;
    if (ff(x, m11) > ff(x, m22))
      rr = m22;
    else
      ll = m11;
  }
  yk = ll;
  return ff(x, ll);
}
int main() {
  cin >> s >> a >> b >> c;
  r = s;
  l = 0;
  for (int i = 1; i <= 300; i++) {
    double m1 = l + (r - l) / 3;
    double m2 = r - (r - l) / 3;
    if (f(m1) > f(m2))
      r = m2;
    else
      l = m1;
  }
  f(l);
  printf("%.12f %.12f %.12f", l, yk, s - l - yk);
}
