//libraries
#include<bits/stdc++.h>
    
//namespace
using namespace std;
    
//typedef
//typedef tree<long long,null_type,less<long long>,rb_tree_tag,tree_order_statistics_node_update> ordered_set;
//typedef tree<long long,null_type,greater<long long>,rb_tree_tag,tree_order_statistics_node_update> ordered_set1;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
typedef pair<long long,long long> pll;
typedef vector<long long> vll;
    
//define
#define i(X) cin>>X;
#define ol(X) cout<<X<<endl;
#define os(X) cout<<X<<" ";
#define inpv(a,n) vector<ll> a(n); for(ll i=0;i<n;i++){cin>>a[i];}
#define pb push_back
#define pf push_front
#define fi first
#define se second
#define line cout<<"\n";
#define pbp(a,b) push_back(make_pair(a,b));
#define iniv(A,n,p) vector<ll> A(n,p);
#define vst(A) sort(A.begin(),A.end());
#define rvst(A) sort(A.rbegin(),A.rend());
#define forin(i,a,b) for(ll i=a;i<=b;i++)
#define forde(i,a,b) for(ll i=a;i>=b;i--)
#define fio ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    
const long long inf=(long long)1e18;
long long MOD=(long long)(1e9+7);
ll mod=MOD;
    
long long binpow(long long a, long long b, long long m) {
    a %= m;
    long long res = 1;
    while (b > 0) {
        if (b & 1)
            res = res * a % m;
        a = a * a % m;
        b >>= 1;
    }
    return res;
}

int main() 
{
    // #ifndef ONLINE_JUDGE
    //     freopen ("input.txt" , "r" , stdin);
    //     // freopen ("OUTPUT.txt" , "w" , stdout);
    // #endif
    fio;
    ll t=1;
    //cin>>t;
    while(t--)
    {
        ll k,n,m;
        cin>>k>>n>>m;
        vector<ll> a(k);
        vector<ll> b(k);
        vector<pair<ld,ll> > z(k);
        ll cur=0;
        forin(i,0,k-1)
        {
            cin>>a[i];
            b[i]=(a[i]*m)/n;
            cur+=b[i];
            ld f=(b[i]*n)-(a[i]*m);
            z.pb({f,i});
        }
        vst(z);
        ll i=0;
        while(cur<m)
        {
            //cout<<z[i].second<<" ";
            b[z[i].second]++;
            i++;
            cur++;
        }
        forin(i,0,k-1) cout<<b[i]<<" ";
        cout<<endl;
    }
}
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
#define all(v) v.begin(), v.end()

//ll の最大値　2147483647≒10^9
//long longの最大値　9,223,372,036,854,775,807≒10^18

ll gcd(ll a, ll b){
    if(a%b==0){
        return b;
    }
    else{
        return gcd(b,a%b);
    }
}
ll digit(ll x){
    ll d=0;
    while(x){
        d++;
        x/=10;
    }
    return d;
}

int main(){
    cout<<fixed<<setprecision(20);
    double N;
    cin>>N;
    double x,y,x_,y_;
    cin>>x>>y>>x_>>y_;
    double cx=(x+x_)/2;
    double cy=(y+y_)/2;
    //cout<<cx<<' '<<cy<<endl;
    x-=cx;
    y-=cy;
    double r=sqrt(x*x+y*y);
    //cout<<r<<endl;
    //cout<<x<<' '<<y<<endl;
    double pi=3.141592653589793;
    double d=2*pi/N;
    double cos_=cos(d);
    double sin_=sin(d);
    double cos=x/r;
    double sin=y/r;
    cout<<r*(cos*cos_-sin*sin_)+cx<<' '<<r*(sin*cos_+cos*sin_)+cy<<endl;
}