#include <bits/stdc++.h>
using namespace std;
double a, b, c, s;
double ans;
double f(double a, double x) {
  if (a == 0 && fabs(x) < 1e-8) return 1;
  if (fabs(x) < 1e-8) return -1e12;
  return a * log(x);
}
double ff(double x, double y) { return f(a, x) + f(b, y) + f(c, s - (x + y)); }
double funk(double x) {
  double L1 = 0, R1 = s - x;
  for (int j = 1; j <= 300; j++) {
    double m3, m4;
    m3 = L1 + (R1 - L1) / 3.0;
    m4 = R1 - (R1 - L1) / 3.0;
    if (ff(x, m3) > ff(x, m4)) {
      R1 = m4;
    } else {
      L1 = m3;
    }
  }
  ans = L1;
  return ff(x, L1);
}
int main() {
  cin >> s >> a >> b >> c;
  double L = 0, R = s;
  for (int i = 1; i <= 300; i++) {
    double m1, m2;
    m1 = L + (R - L) / 3.0;
    m2 = R - (R - L) / 3.0;
    if (funk(m1) > funk(m2)) {
      R = m2;
    } else {
      L = m1;
    }
  }
  funk(L);
  printf("%.12f %.12f %.12f", L, ans, s - ans - L);
}
