#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
const long double PI = acos(-1);
const int N = 2e5 + 10;
const long long mod = 1e9 + 7;
const long long inf = 2e18;
long long xyp(long long x, long long y) {
  if (y == 0) return 1LL;
  if (y == 1) return x;
  if (y % 2) {
    long long p = xyp(x, y - 1);
    return (x * p) % mod;
  }
  long long p = xyp(x, y / 2);
  return (p * p) % mod;
}
long long add(long long a, long long b) {
  return (a % mod + b % mod + mod) % mod;
}
long long sub(long long a, long long b) {
  return (a % mod - b % mod + mod) % mod;
}
long long mul(long long a, long long b) {
  return ((a % mod) * (b % mod) + mod) % mod;
}
template <class T>
ostream& operator<<(ostream& os, vector<T> V) {
  os << "[ ";
  for (auto v : V) os << v << " ";
  return os << "]";
}
template <class T>
ostream& operator<<(ostream& os, set<T> second) {
  os << "{ ";
  for (auto s : second) os << s << " ";
  return os << "}";
}
template <class L, class R>
ostream& operator<<(ostream& os, pair<L, R> P) {
  return os << "(" << P.first << "," << P.second << ")";
}
template <class L, class R>
ostream& operator<<(ostream& os, map<L, R> M) {
  os << "{ ";
  for (auto m : M) os << "(" << m.first << ":" << m.second << ")";
  return os << "}";
}
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cout << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cout.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << fixed << setprecision(12);
  {
    double s;
    double a, b, c;
    cin >> s >> a >> b >> c;
    cout << fixed << setprecision(10);
    double x, y, z;
    if (a == 0 && b == 0 && c == 0) {
      cout << a << " " << b << " " << c;
    } else {
      x = s * a / (a + b + c);
      y = s * b / (a + b + c);
      z = s * c / (a + b + c);
      cout << x << " " << y << " " << z;
    }
  }
  return 0;
}
