#include <bits/stdc++.h>
using namespace std;
enum STATE { IN, OUT, BOUNDRY };
const double PI = acos(-1.0);
void fast_in_out() {
  std::ios_base::sync_with_stdio(NULL);
  cin.tie(NULL);
  cout.tie(NULL);
}
int dx[] = {0, 0, -1, 1, -1, 1, -1, 1, 0};
int dy[] = {-1, 1, 0, 0, -1, -1, 1, 1, 0};
int lx[] = {2, 2, -1, 1, -2, -2, -1, 1};
int ly[] = {-1, 1, 2, 2, 1, -1, -2, -2};
const int N = 1e5 + 40, M = 1e5 + 10, mod = 1e9 + 7;
long long x, y, z;
long long nxt(long long n) { return (n * x + n % y) % z; }
int main() {
  fast_in_out();
  cout << fixed << setprecision(17);
  int s, a, b, c;
  long double sum;
  cin >> s >> a >> b >> c;
  sum = a + b + c;
  if (sum == 0)
    cout << "0 0 0\n";
  else {
    long double x = s * a;
    x /= sum;
    long double y = s * b;
    y /= sum;
    long double z = s * c;
    z /= sum;
    cout << x << " " << y << " " << z << '\n';
  }
  return 0;
}
