#include <bits/stdc++.h>
using namespace std;
const int INF = (int)1E9 + 7;
const double EPS = 1E-9;
const double PI = 3.1415926535897932384626433832795;
const int ITER = 500;
int s, a, b, c;
inline double max2(double s, bool print = false) {
  double l = 0, r = s;
  for (int i = 0; i < int(ITER); ++i) {
    double d = (r - l) / 3;
    double ml = l + d;
    double mr = r - d;
    if (b * log(ml) + c * log(s - ml) > b * log(mr) + c * log(s - mr))
      r = mr;
    else
      l = ml;
  }
  if (print) printf("%0.10f %0.10f\n", double(l), double(s - l));
  return b * log(l) + c * log(s - l);
}
inline void max1() {
  double l = 0, r = s;
  for (int i = 0; i < int(ITER); ++i) {
    double d = (r - l) / 3;
    double ml = l + d;
    double mr = r - d;
    if (max2(s - ml) + a * log(ml) > max2(s - mr) + a * log(mr))
      r = mr;
    else
      l = ml;
  }
  printf("%0.10f ", (double)l);
  max2(s - l, true);
}
int main() {
  cin >> s >> a >> b >> c;
  max1();
  return 0;
}
