#include <bits/stdc++.h>
using namespace std;
int main() {
  cout << setprecision(20);
  double s, a, b, c;
  cin >> s >> a >> b >> c;
  if (a == 0 and b == 0 and c == 0) {
    cout << "0 0 0\n";
    return 0;
  }
  double k = s / (a + b + c);
  cout << a * k << " " << b * k << " " << c * k << "\n";
  return 0;
}
