#include <bits/stdc++.h>
using namespace std;
void Fastio() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
double adotb(complex<long double> a, complex<long double> b) {
  return (conj(a) * b).real();
}
double acrossb(complex<long double> a, complex<long double> b) {
  return (conj(a) * b).imag();
}
double sinseta(complex<long double> a, complex<long double> b) {
  return abs(acrossb(a, b) / (abs(a) * abs(b)));
}
long long fact[1000006], inv[1000006];
long long fp(long long base, long long exp) {
  if (exp == 0) return 1;
  long long ans = fp(base, exp / 2);
  ans = (ans * ans) % 1000000007;
  if (exp % 2 != 0) ans = (ans * (base % 1000000007)) % 1000000007;
  return ans;
}
void calcFacAndInv(long long n) {
  fact[0] = inv[0] = 1;
  for (long long i = 1; i <= n; i++) {
    fact[i] = (i * fact[i - 1]);
    inv[i] = fp(fact[i], 1000000007 - 2);
  }
}
long long ncr(long long n, long long r) {
  return ((fact[n] * inv[r]) % 1000000007 * inv[n - r]) % 1000000007;
}
long long npr(long long n, long long r) {
  return (fact[n] * inv[n - r]) % 1000000007;
}
long double NCR(int n, int m) {
  long double res = 1;
  m = min(m, n - m);
  for (int i = 0; i < m; i++) {
    res = res * (n - i) / (i + 1);
  }
  return res;
}
long long tol(string a) {
  long long res = 0;
  while (a[0] == '0') {
    a.erase(a.begin());
  }
  if (a == "") a = "0";
  for (int i = 0; i < a.size(); i++) {
    res *= 10;
    res += a[i] - '0';
  }
  return res;
}
const int MAXN = 1e7 + 2;
int spf[MAXN];
void sieve() {
  spf[1] = 1;
  for (int i = 2; i < MAXN; i++) spf[i] = i;
  for (int i = 4; i < MAXN; i += 2) spf[i] = 2;
  for (int i = 3; i * i < MAXN; i++) {
    if (spf[i] == i) {
      for (int j = i * i; j < MAXN; j += i)
        if (spf[j] == j) spf[j] = i;
    }
  }
}
vector<long long> getFactorization(int x) {
  vector<long long> ret;
  while (x != 1) {
    ret.push_back(spf[x]);
    x = x / spf[x];
  }
  return ret;
}
class data {
 public:
  string s;
  int calc() {
    int c = 0;
    for (int i = 0; i < 3; i++) {
      if (s[i] == '1') c++;
    }
    return c;
  }
};
double distance(complex<long double> a, complex<long double> b) {
  return abs(b - a);
}
int main() {
  Fastio();
  long double n, sum = 0;
  cin >> n;
  long double arr[3];
  for (int i = 0; i < 3; i++) {
    cin >> arr[i];
    sum += arr[i];
  }
  if (!arr[2] && !arr[1] && !arr[0]) return cout << "0 0 0\n", 0;
  cout << fixed << setprecision(11);
  cout << n * arr[0] / sum << " " << n * arr[1] / sum << " " << n * arr[2] / sum
       << '\n';
  return 0;
}
