#include <bits/stdc++.h>
using namespace std;
bool foo(const pair<int, double>& p1, const pair<int, double>& p2) {
  if (p1.second == p2.second) return p1.first < p2.first;
  return p1.second > p2.second;
}
double a, b, c;
static double calc(double x, double y, double z) {
  double val = 0;
  if (a > 0) val += a * log(x);
  if (b > 0) val += b * log(y);
  if (c > 0) val += c * log(z);
  return val;
}
int main(int argc, char* argv[]) {
  stringstream strStr;
  double S;
  cin >> S;
  cin >> a;
  cin >> b;
  cin >> c;
  double x = 0;
  double y = 0;
  double z = 0;
  double dMax = -10000000000000000;
  double dStep = 10;
  double dPrec = 0.0000000001;
  for (int idx = 0; idx < 100; ++idx) {
    bool bFound = false;
    int ii, jj, kk;
    int nMin = -10, nMax = 10;
    if (dStep == 10) {
      nMin = 0;
      nMax = S / dStep + 1;
    }
    for (int i = nMin; i <= nMax; ++i)
      for (int j = nMin; j <= nMax; ++j)
        for (int k = nMin; k <= nMax; ++k)
          if (x + i * dStep >= 0 && y + j * dStep >= 0 && z + k * dStep >= 0 &&
              (x + i * dStep + y + j * dStep + z + k * dStep - S < dPrec ||
               abs(x + i * dStep + y + j * dStep + z + k * dStep - S) <
                   dPrec)) {
            double dNewMax = calc(x + i * dStep, y + j * dStep, z + k * dStep);
            if (dMax < dNewMax) {
              bFound = true;
              ii = i;
              jj = j;
              kk = k;
              dMax = dNewMax;
            }
          }
    if (bFound) {
      x = x + ii * dStep;
      y = y + jj * dStep;
      z = z + kk * dStep;
    }
    dStep /= 10.;
  }
  cout << fixed << setprecision(20) << x << " " << y << " " << z;
  return 0;
  return 0;
}
