#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:300000000")
#pragma warning(disable : 4800)
using namespace std;
const double pi = 3.1415926535897932384626433832795;
template <class T>
T abs(const T &a) {
  return a >= 0 ? a : -a;
};
template <class T>
T sqr(const T &x) {
  return x * x;
}
double s;
double a, b, c;
double mylog(double a, double b) {
  if (a == 0.0 && b == 0.0) return 0;
  return a * log(b);
}
double f(double x, double y) {
  double z = s - x - y;
  return mylog(a, x) + mylog(b, y) + mylog(c, z);
}
double test(double x) {
  double ly = 0, ry = s - x;
  for (int _ = 0; _ < (1000); _++) {
    double mid1 = (2 * ly + ry) / 3;
    double mid2 = (ly + 2 * ry) / 3;
    if (f(x, mid1) < f(x, mid2))
      ly = mid1;
    else
      ry = mid2;
  }
  return ly;
}
int main() {
  cin >> s >> a >> b >> c;
  double lx = 0, rx = s;
  double t1, t2;
  for (int _ = 0; _ < (1000); _++) {
    double mid1 = (2 * lx + rx) / 3;
    double mid2 = (lx + 2 * rx) / 3;
    t1 = test(mid1);
    t2 = test(mid2);
    if (f(mid1, t1) < f(mid2, t2))
      lx = mid1;
    else
      rx = mid2;
  }
  cout.setf(ios::fixed);
  cout.precision(20);
  cout << lx << ' ' << t1 << ' ' << s - lx - t1;
}
