#include <bits/stdc++.h>
using namespace std;
int main() {
  double s;
  cin >> s;
  double a, b, c;
  cin >> a >> b >> c;
  if (a == 0 && b == 0 && c == 0)
    printf("0 0 %.08lf", s);
  else {
    printf("%.15lf %.15lf %.15lf", s / (a + b + c) * a, s / (a + b + c) * b,
           s / (a + b + c) * c);
  }
  return 0;
}
