#include <bits/stdc++.h>
using namespace std;
int main() {
  double a, b, c, s, sum = 0;
  cin >> s >> a >> b >> c;
  sum = a + b + c;
  if (sum == 0) {
    cout << a << ' ' << b << ' ' << c << endl;
    return 0;
  }
  printf("%.10lf %.10lf %.10lf\n", s * a / sum, s * b / sum, s * c / sum);
}
