#include <bits/stdc++.h>
using namespace std;
using LL = int64_t;
const int INF = 0x3fffffff;
const int MOD = 1e9 + 7;
const double EPS = 1e-6;
const double PI = 2 * asin(1);
int g_s, g_a, g_b, g_c;
void pretreat() {}
bool input() {
  cin >> g_s;
  if (cin.eof()) return false;
  scanf("%d%d%d", &g_a, &g_b, &g_c);
  return true;
}
void solve() {
  if (g_a + g_b + g_c == 0) {
    puts("0 0 0");
    return;
  }
  int sum = g_a + g_b + g_c;
  double x = (double)g_a / sum * g_s;
  double y = (double)g_b / sum * g_s;
  double z = (double)g_c / sum * g_s;
  printf("%.15f %.15f %.15f\n", x, y, z);
}
int main() {
  pretreat();
  while (input()) {
    solve();
  }
  return 0;
}
