#include <bits/stdc++.h>
using namespace std;
int main() {
  int s;
  int a[3];
  cin >> s;
  int t = 0;
  for (int i = 0; i < 3; ++i) {
    cin >> a[i];
    t += a[i];
  }
  cout << fixed << setprecision(16);
  if (t == 0) {
    cout << 0.0 << ' ' << 0.0 << ' ' << (long double)s << '\n';
  } else {
    cout << (long double)s * a[0] / t << ' ' << (long double)s * a[1] / t << ' '
         << (long double)s * a[2] / t << '\n';
  }
  return 0;
}
