#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-9;
double s;
double a, b, c;
double x, y, z;
double f2(double midx, double midy) {
  z = s - midx - midy;
  return a * log(midx) + b * log(midy) + c * log(z);
}
double f(double mid) {
  double low = 0, high = s - mid;
  while (high - low > eps) {
    double mid1 = low + (high - low) / 3.0;
    double mid2 = low + 2.0 * (high - low) / 3.0;
    if (f2(mid, mid1) > f2(mid, mid2)) {
      high = mid2;
      y = mid1;
    } else {
      low = mid1;
      y = mid2;
    }
  }
  return f2(mid, y);
}
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> s >> a >> b >> c;
  double low = 0, high = s;
  while (high - low > eps) {
    double mid1 = low + (high - low) / 3.0;
    double mid2 = low + 2.0 * (high - low) / 3.0;
    if (f(mid1) > f(mid2)) {
      high = mid2;
      x = mid1;
    } else {
      low = mid1;
      x = mid2;
    }
  }
  cout << fixed << setprecision(13);
  cout << x << " " << y << " " << z << endl;
  return 0;
}
