#include <bits/stdc++.h>
using namespace std;
const int N = (int)2e5 + 4;
const int K = 60;
const int M = 505;
const long double eps = 1e-8;
const int inf = (int)1e9 + 7;
int main() {
  double s, a, b, c;
  scanf("%lf\n%lf%lf%lf", &s, &a, &b, &c);
  if (a == 0 && b == 0 && c == 0) {
    printf("0 0 0");
    return 0;
  }
  printf("%.12lf %.12lf %.12lf", a * s / (a + b + c), b * s / (a + b + c),
         c * s / (a + b + c));
  return 0;
}
