#include <bits/stdc++.h>
using namespace std;
double s, a, b, c, ts;
int main() {
  ios_base::sync_with_stdio(0);
  cin >> s;
  cin >> a >> b >> c;
  ts = a + b + c;
  cout.precision(11);
  if (ts == 0)
    cout << 0 << " " << 0 << " " << 0 << endl;
  else
    cout << fixed << a / ts * s - 1e-11 << " " << b / ts * s - 1e-11 << " "
         << c / ts * s - 1e-11 << endl;
  cin.get();
  cin.get();
  return 0;
}
