#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:256000000")
using namespace std;
template <class T>
inline T sqr(T a) {
  return a * a;
}
double s, a, b, c;
double x, y, z;
double fz(double x, double y) {
  double l = 0, r = s - x - y;
  double res = .0;
  z = r;
  if (abs(x) < 1e-9 || abs(y) < 1e-9 || abs(r) < 1e-9) return -123456789 - .0;
  res = a * log(x) + b * log(y) + c * log(r);
  return res;
}
double fy(double xt) {
  double l = 0, r = s - xt;
  double res = .0;
  for (int it = 0; it < 64; ++it) {
    double yl = (2 * l + r) / 3, yr = (2 * r + l) / 3;
    double fl = fz(xt, yl), fr = fz(xt, yr);
    res = max(fl, fr);
    if (fl < fr) {
      l = yl;
      y = yr;
      continue;
    }
    r = yr;
    y = yl;
  }
  return res;
}
int main() {
  cin >> s >> a >> b >> c;
  double l = 0, r = s;
  for (int it = 0; it < 64; ++it) {
    double xl = (2 * l + r) / 3, xr = (2 * r + l) / 3;
    double fl = fy(xl), fr = fy(xr);
    if (fl < fr) {
      l = xl;
      x = xr;
      continue;
    }
    r = xr;
    x = xl;
  }
  printf("%.15lf %.15lf %.15lf", x, y, z);
  return 0;
}
