#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  double s, x, y, z;
  cin >> s >> x >> y >> z;
  if ((x == y) && (y == z) && (z == 0.0)) {
    cout << "0 0 " << s << endl;
    return 0;
  }
  double k = x + y + z, x0 = x * s / k, y0 = y * s / k, z0 = z * s / k;
  if (x0 + y0 + z0 >= s) z0 -= (x0 + y0 + z0 - s);
  cout << setprecision(14) << x0 << " " << y0 << " " << z0 << endl;
  return 0;
}
