#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-7;
const int INFN = 1e9;
int a, b, c;
int S;
double mlog(double a) {
  if (a == 0) return -INFN;
  return log(a);
}
double ternary_y(double x) {
  if (b + c == 0) return 0;
  return (b * (S - x)) / (b + c);
}
double ternary_x() {
  double l = 0, r = S;
  while (r - l > eps) {
    double m1 = l + (r - l) / 3, m2 = r - (r - l) / 3;
    double y1 = ternary_y(m1), y2 = ternary_y(m2);
    if (a * mlog(m1) + b * mlog(y1) + c * mlog(S - m1 - y1) <
        a * mlog(m2) + b * mlog(y2) + c * mlog(S - m2 - y2))
      l = m1;
    else
      r = m2;
  }
  return r;
}
int main() {
  cin >> S;
  cin >> a >> b >> c;
  double x = ternary_x();
  double y = ternary_y(x);
  double z = S - x - y;
  if (x + y + z > S) z -= x + y + z - S;
  cout << fixed << setprecision(15) << x << " " << y << " " << z << endl;
}
