#include <bits/stdc++.h>
using namespace std;
int main() {
  long double S;
  cin >> S;
  vector<pair<int, int> > v(3);
  cin >> v[0].first >> v[1].first >> v[2].first;
  for (int i = 0; i < 3; i++) v[i].second = i;
  sort(v.begin(), v.end());
  if (v[2].first == 0) {
    printf("0 0 0\n");
    return 0;
  }
  long double x = v[0].first / (long double)v[2].first;
  long double y = v[1].first / (long double)v[2].first;
  long double z = 1;
  long double sum = x + y + z;
  x = x / sum * S;
  y = y / sum * S;
  z = z / sum * S;
  vector<pair<int, long double> > ans;
  ans.push_back(make_pair(v[0].second, x));
  ans.push_back(make_pair(v[1].second, y));
  ans.push_back(make_pair(v[2].second, z));
  sort(ans.begin(), ans.end());
  cout.precision(15);
  cout << fixed << ans[0].second << " " << ans[1].second << " " << ans[2].second
       << endl;
  return 0;
}
