#include <bits/stdc++.h>
#pragma comment(linker, "/stack:640000000")
using namespace std;
const double EPS = 1e-9;
const int INF = 0x7f7f7f7f;
const double PI = acos(-1.0);
template <class T>
inline T _abs(T n) {
  return ((n) < 0 ? -(n) : (n));
}
template <class T>
inline T _max(T a, T b) {
  return (!((a) < (b)) ? (a) : (b));
}
template <class T>
inline T _min(T a, T b) {
  return (((a) < (b)) ? (a) : (b));
}
template <class T>
inline T _swap(T& a, T& b) {
  a = a ^ b;
  b = a ^ b;
  a = a ^ b;
}
template <class T>
inline T gcd(T a, T b) {
  return (b) == 0 ? (a) : gcd((b), ((a) % (b)));
}
template <class T>
inline T lcm(T a, T b) {
  return ((a) / gcd((a), (b)) * (b));
}
template <typename T>
string NumberToString(T Number) {
  ostringstream second;
  second << Number;
  return second.str();
}
struct debugger {
  template <typename T>
  debugger& operator,(const T& v) {
    cerr << v << " ";
    return *this;
  }
} dbg;
double logg(double x, double a) {
  if (x < EPS) {
    if (a < EPS) return 1;
    return -10000.0;
  }
  return a * log10(x);
}
int main() {
  int s;
  while (~scanf("%d", &s)) {
    int a, b, c;
    scanf("%d%d%d", &a, &b, &c);
    double low1 = 0.0, high1 = (double)s;
    double y1, y2;
    int c1 = 444;
    while (c1--) {
      double m11 = (low1 * 2.0 + high1) / 3.0;
      int c2 = 444;
      double low2 = 0.0, high2 = ((double)s - m11);
      while (c2--) {
        double m12 = (low2 * 2.0 + high2) / 3.0;
        double m22 = (low2 + high2 * 2.0) / 3.0;
        double z1 = (double)s - m11 - m12;
        double z2 = (double)s - m11 - m22;
        double now1 = logg(m11, a) + logg(m12, b) + logg(z1, c);
        double now2 = logg(m11, a) + logg(m22, b) + logg(z2, c);
        if (now1 > now2 + EPS) {
          high2 = m22;
        } else {
          low2 = m12;
        }
      }
      y1 = (low2 + high2) / 2.0;
      double z1 = (double)s - y1 - m11;
      double now1 = logg(m11, a) + logg(y1, b) + logg(z1, c);
      double m21 = (low1 + high1 * 2.0) / 3.0;
      c2 = 444;
      low2 = 0.0, high2 = ((double)s - m21);
      while (c2--) {
        double m12 = (low2 * 2.0 + high2) / 3.0;
        double m22 = (low2 + high2 * 2.0) / 3.0;
        double z1 = (double)s - m21 - m12;
        double z2 = (double)s - m21 - m22;
        double now1 = logg(m21, a) + logg(m12, b) + logg(z1, c);
        double now2 = logg(m21, a) + logg(m22, b) + logg(z2, c);
        if (now1 > now2 + EPS) {
          high2 = m22;
        } else {
          low2 = m12;
        }
      }
      y2 = (low2 + high2) / 2.0;
      double z2 = (double)s - y2 - m21;
      double now2 = logg(m21, a) + logg(y2, b) + logg(z2, c);
      if (now1 > now2 + EPS) {
        high1 = m21;
      } else {
        low1 = m11;
      }
    }
    double xx = (low1 + high1) / 2.0;
    double yy = (y1 + y2) / 2.0;
    double zz = (double)s - xx - yy;
    printf("%.10lf %.10lf %.10lf\n", xx, yy, zz);
  }
  return 0;
}
