#include <bits/stdc++.h>
using namespace std;
int s;
int a, b, c;
long double fun(long double x, long double y, long double z) {
  return a * log(x) + b * log(y) + c * log(z);
}
long double calc(long double x) {
  long double lo = 0, hi = s - x, ans = 0;
  int loop = 0;
  while (loop++ < 400) {
    auto m1 = lo + (hi - lo) / 3.0;
    auto m2 = hi - (hi - lo) / 3.0;
    if (fun(x, m1, s - x - m1) <= fun(x, m2, s - x - m2)) {
      lo = m1;
      ans = m1;
    } else {
      hi = m2;
    }
  }
  return fun(x, ans, s - x - ans);
}
int main() {
  cin >> s;
  cin >> a >> b >> c;
  long double lo = 0, hi = s, ans = 0;
  ;
  int loop = 0;
  ;
  while (loop++ < 400) {
    auto m1 = lo + (hi - lo) / 3.0;
    auto m2 = hi - (hi - lo) / 3.0;
    if (calc(m1) <= calc(m2)) {
      lo = m1;
      ans = m1;
    } else {
      hi = m2;
    }
  }
  lo = 0, hi = s - ans;
  long double ans1 = 0;
  ;
  loop = 0;
  while (loop++ < 400) {
    auto m1 = lo + (hi - lo) / 3.0;
    auto m2 = hi - (hi - lo) / 3.0;
    if (fun(ans, m1, s - ans - m1) <= fun(ans, m2, s - ans - m2)) {
      lo = m1;
      ans1 = m1;
    } else {
      hi = m2;
    }
  }
  cout << fixed << setprecision(10) << ans << " " << ans1 << " "
       << s - ans - ans1 << endl;
}
