#include <bits/stdc++.h>
int faster_in() {
  int r = 0, c;
  for (c = getchar(); c <= 32; c = getchar())
    ;
  if (c == '-') return -faster_in();
  for (; c > 32; r = (r << 1) + (r << 3) + c - '0', c = getchar())
    ;
  return r;
}
using namespace std;
const int INF = int(1e9 + 7);
double s;
double a, b, c;
double EPS = 1e-11;
double f(double x, double y, double z) {
  return a * log(x) + b * log(y) + c * log(z);
}
double ternary(double x, double &y) {
  double lo = 0.0, hi = s - x;
  for (int k = 0; k < 200; k++) {
    double L, R;
    L = (lo * 2.0 + hi) / 3.0;
    R = (lo + 2.0 * hi) / 3.0;
    double lRes = f(x, L, s - x - L);
    double rRes = f(x, R, s - x - R);
    if (lRes > rRes)
      hi = R;
    else
      lo = L;
  }
  y = lo;
  return f(x, y, s - x - y);
}
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> s;
  cin >> a >> b >> c;
  pair<double, int> v[3];
  double res[3];
  v[0] = make_pair(a, 0);
  v[1] = make_pair(b, 1);
  v[2] = make_pair(c, 2);
  sort(v, v + 3);
  a = v[2].first;
  b = v[1].first;
  c = v[0].first;
  if (a == 0) {
    cout << "0 0 0";
    return 0;
  }
  if (b == 0) {
    res[v[2].second] = s;
    res[v[1].second] = 0;
    res[v[0].second] = 0;
    cout << fixed << setprecision(7) << res[0] << ' ' << res[1] << ' ' << res[2]
         << '\n';
    return 0;
  }
  double x, y;
  double lo = 0.0, hi = s;
  for (int k = 0; k < 200; k++) {
    double L, R;
    L = (lo * 2.0 + hi) / 3.0;
    R = (lo + 2.0 * hi) / 3.0;
    if (ternary(L, y) > ternary(R, y)) {
      hi = R;
      ternary(L, y);
    } else {
      lo = L;
      ternary(R, y);
    }
  }
  x = lo;
  res[v[2].second] = x;
  res[v[1].second] = y;
  res[v[0].second] = s - x - y;
  cout << fixed << setprecision(11) << res[0] << ' ' << res[1] << ' ' << res[2]
       << '\n';
  return 0;
}
