#include <bits/stdc++.h>
using namespace std;
double S, a, b, c;
int main() {
  while (~scanf("%lf%lf%lf%lf", &S, &a, &b, &c)) {
    if (a == 0.0 && b == 0.0 && c == 0.0)
      printf("0.0 0.0 0.0\n");
    else {
      double abc = a + b + c;
      double x = S / abc * a, y = S / abc * b, z = S / abc * c;
      printf("%.11f %.11f %.11f\n", x, y, z);
    }
  }
  return 0;
}
