#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:64000000")
template <class T>
inline T sqr(T x) {
  return x * x;
}
int main() {
  int s;
  int a[3];
  cin >> s;
  int sum = 0;
  for (int i = 0; i < 3; ++i) {
    cin >> a[i];
    sum += a[i];
  }
  if (!sum) {
    puts("0 0 0");
    return 0;
  }
  for (int i = 0; i < 3; ++i) {
    printf("%.15lf ", double(s * a[i]) / sum);
  }
  return 0;
}
