#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:400000000")
double S, a, b, c;
double f(double x, double y) {
  if (x == 0)
    return 0;
  else
    return exp(x * y);
}
int main() {
  cin >> S >> a >> b >> c;
  if (a + b + c < 5e-12)
    cout << "0 0 0";
  else {
    double d = a + b + c;
    printf("%.11f %.11f %.11f", S * a / d - 5e-12, S * b / d - 5e-12,
           S * c / d - 5e-12);
  }
}
