#include <bits/stdc++.h>
int s, a, b, c;
int main() {
  scanf("%d", &s);
  scanf("%d%d%d", &a, &b, &c);
  if (a + b + c) {
    printf("%.10lf %.10lf", a * 1.0 / (a + b + c) * s,
           b * 1.0 / (a + b + c) * s);
    printf(" %.10lf\n", c * 1.0 / (a + b + c) * s);
  } else
    printf("0 0 0\n");
  return 0;
}
