#include<bits/stdc++.h>
#define all(x) x.begin(),x.end()
#define INF 0x3f3f3f3f
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int,int> iipair;
typedef pair<unsigned,unsigned> uupair;
typedef vector<int> vec;
typedef vector<unsigned> uvec;

int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	ll sx,sy,gx,gy;
	cin>>sx>>sy>>gx>>gy;
	ld res = (static_cast<ld>(sx*gy + sy*gx))/(sy+gy);
	cout<<fixed<<setprecision(12)<<res;
}
#include <bits/stdc++.h>
#define ll long long
#define For(i,a,b) for(int i=a; i<=b; i++)
using namespace std;
long double n, m;
long long k;
const int MaxN = 1e5 + 4;
long double a[MaxN];
long long b[MaxN];
pair<long double, int> c[MaxN];
int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	ll t = 0, n, k, m;
	cin >> k >> n >> m;
	For(i, 1, k) cin >> a[i];
	For(i, 1, k) b[i] = (a[i] * m) / n, t += b[i];
	int cnt = m - t;
	For(i, 1, k) {
		long double s = a[i], s2 = b[i], s3 = b[i] + 1;
		s /= (n * 1.0);
		s2 /= (m * 1.0);
		s3 /= (m * 1.0);
		s = abs(s3 - s) - abs(s2 - s);
		c[i] = {s, i};
	}
	sort(c + 1, c + k + 1);
	For(i, 1, k) {
		if (cnt == 0) break;
		b[c[i].second]++;
		cnt--;
		if (cnt == 0) break;
	}
	For(i, 1, k) cout << b[i] << ' ';
}