#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-9;
double sum, a, b, c, mid1, mid2;
double X, Y, Z;
double idk(double x, double y, double z) {
  return a * log(x) + b * log(y) + c * log(z);
}
double ternaryY(double x) {
  double startY = 0.0, endY = sum - x, midOneY, midTwoY;
  while (endY - startY > eps) {
    midOneY = startY + (endY - startY) / 3.0;
    midTwoY = endY - (endY - startY) / 3.0;
    if (idk(x, midOneY, sum - (x + midOneY)) >
        idk(x, midTwoY, sum - (x + midTwoY)))
      endY = midTwoY;
    else
      startY = midOneY;
  }
  double y = (startY + endY) / 2.0;
  X = x, Y = y, Z = sum - x - y;
  return idk(X, Y, Z);
}
int main() {
  cin >> sum >> a >> b >> c;
  double startX = 0.0, endX = sum, midOneX, midTwoX;
  while (endX - startX > eps) {
    midOneX = startX + (endX - startX) / 3.0;
    midTwoX = endX - (endX - startX) / 3.0;
    if (ternaryY(midOneX) > ternaryY(midTwoX))
      endX = midTwoX;
    else
      startX = midOneX;
  }
  cout << fixed << setprecision(12) << X << " " << Y << " " << Z << endl;
  return 0;
}
