#include <bits/stdc++.h>
using namespace std;
int s, a, b, c;
double x, y, z;
int main() {
  scanf("%d", &s);
  scanf("%d%d%d", &a, &b, &c);
  if (a == 0 && b == 0 && c == 0) {
    printf("0.0 0.0 0.0\n");
    return 0;
  }
  x = (double)a * (double)s / (double)(a + b + c);
  y = (double)b * (double)s / (double)(a + b + c);
  z = (double)c * (double)s / (double)(a + b + c);
  printf("%.15lf %.15lf %.15lf\n", x, y, z);
  return 0;
}
