#include <bits/stdc++.h>
int main(int argc, const char* argv[]) {
  double s, a, b, c;
  scanf("%lf", &s);
  scanf("%lf%lf%lf", &a, &b, &c);
  double sum = a + b + c;
  if (sum < 0.5) {
    printf("0 0 0\n");
    return 0;
  }
  double x = s * (a / sum);
  double y = s * (b / sum);
  double z = s * (c / sum);
  printf("%.10lf %.10lf %.10lf", x, y, z);
  return 0;
}
