#include <bits/stdc++.h>
using namespace std;
double S, a, b, c;
double calc(double x, double y, double z) {
  double v = (x > 0 ? log(x) * a : 0) + (y > 0 ? log(y) * b : 0) +
             (z > 0 ? log(z) * c : 0);
  return v;
}
int main(void) {
  scanf("%lf", &S);
  scanf("%lf%lf%lf", &a, &b, &c);
  if (a == 0 && b == 0 && c == 0) {
    printf("0.0 0.0 0.0\n");
  } else {
    double P = S / (a + b + c);
    printf("%.15f %.15f %.15f\n", P * a, P * b, P * c);
  }
  return 0;
}
