#include <bits/stdc++.h>
using namespace std;
int S, A[3];
double a, b, c, ta, tb, maxv = -1e50, high, low, highi, lowi, mid1, midi1, mid2,
                        midi2, mx, my, mz;
double maxmid(double mid) {
  double ta, tb, remain = S - mid;
  highi = remain;
  lowi = 0;
  for (int i = 0; i < 100; ++i) {
    midi1 = lowi + (highi - lowi) / 3;
    midi2 = highi - (highi - lowi) / 3;
    ta = a * log(mid) + b * log(midi1) + c * log(remain - midi1),
    tb = a * log(mid) + b * log(midi2) + c * log(remain - midi2);
    if (ta > maxv) maxv = ta, mx = mid, my = midi1, mz = remain - midi1;
    (ta > tb) ? (highi = midi2) : (lowi = midi1);
  }
  return ta;
}
int main() {
  scanf("%d", &S);
  for (int i = 0; i < 3; ++i) scanf("%d", A + i);
  a = *A;
  b = 1 [A];
  c = A[2];
  switch (!*A + !1 [A] + !A[2]) {
    case 3:
    case 2:
    case 1:
    case 0:
      high = S;
      low = 0;
      for (int i = 0; i < 100; ++i) {
        mid1 = low + (high - low) / 3;
        mid2 = high - (high - low) / 3;
        ta = maxmid(mid1);
        tb = maxmid(mid2);
        (ta > tb) ? (high = mid2) : (low = mid1);
      }
      printf("%.10lf %.10lf %.10lf\n", mx, my, mz);
  }
}
