#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,unroll-loops")
#pragma GCC target("avx,avx2,fma")
using namespace std;
int recur_depth = 0;
long long s, a, b, c;
inline double dist(double x, double y, double z) {
  if ((abs(x) <= 1e-9 && a != 0) || (abs(y) <= 1e-9 && b != 0) ||
      (abs(z) <= 1e-9 && c != 0))
    return -(1LL << 61);
  double f1 = 0, f2 = 0, f3 = 0;
  if (x != 0) f1 = a * log(x);
  if (y != 0) f2 = b * log(y);
  if (z != 0) f3 = c * log(z);
  return f1 + f2 + f3;
}
pair<double, double> solve(double x) {
  double lo = 0, hi = s - x;
  pair<double, double> ret;
  long long cnt = 200;
  while (cnt--) {
    double mid1 = (2 * lo + hi) / 3, mid2 = (lo + 2 * hi) / 3;
    double got1 = dist(x, mid1, s - (x + mid1)),
           got2 = dist(x, mid2, s - (x + mid2));
    if (got1 > got2) {
      ret = make_pair(got1, mid1);
      hi = mid2;
    } else {
      ret = make_pair(got2, mid2);
      lo = mid1;
    }
  }
  return ret;
}
int main() {
  cin >> s >> a >> b >> c;
  double lo = 0, hi = s, p1 = 0, p2 = 0;
  long long cnt = 200;
  while (cnt--) {
    double mid1 = (2 * lo + hi) / 3, mid2 = (lo + 2 * hi) / 3;
    pair<double, double> got1 = solve(mid1), got2 = solve(mid2);
    if (got1.first > got2.first) {
      p1 = mid1, p2 = got1.second;
      hi = mid2;
    } else {
      p1 = mid2, p2 = got2.second;
      lo = mid1;
    }
  }
  cout << setprecision(15) << fixed << p1 << " " << p2 << " "
       << (double)s - (p1 + p2) << '\n';
  return 0;
}
