// Jai Shree Ram  
  
#include<bits/stdc++.h>
using namespace std;

#define rep(i,a,n)     for(int i=a;i<n;i++)
#define ll             long long
#define int            long long
#define pb             push_back
#define all(v)         v.begin(),v.end()
#define endl           "\n"
#define x              first
#define y              second
#define gcd(a,b)       __gcd(a,b)
#define mem1(a)        memset(a,-1,sizeof(a))
#define mem0(a)        memset(a,0,sizeof(a))
#define sz(a)          (int)a.size()
#define pii            pair<int,int>
#define hell           1000000007
#define elasped_time   1.0 * clock() / CLOCKS_PER_SEC



template<typename T1,typename T2>istream& operator>>(istream& in,pair<T1,T2> &a){in>>a.x>>a.y;return in;}
template<typename T1,typename T2>ostream& operator<<(ostream& out,pair<T1,T2> a){out<<a.x<<" "<<a.y;return out;}
template<typename T,typename T1>T maxs(T &a,T1 b){if(b>a)a=b;return a;}
template<typename T,typename T1>T mins(T &a,T1 b){if(b<a)a=b;return a;}


int solve(){
 		int k,n,m; cin >> k >> n >> m;

 		vector<int>a(k+1);
 		rep(i,1,k+1){
 			cin >> a[i];
 		}
 		pii p;
 		auto func = [&](int x){
 			int l = 0;
 			int r = 0;
 			for(int i = 1; i <= k; i++){
 				// |bn - am| <= x
 				// [(am-x)/(n),(am+x)(n)]
 				int mx = (a[i]*m + x)/n;
 				int mn = (a[i]*m - x)/n;
 				if(mn*n < a[i]*m - x)mn++;
 				maxs(mn,0LL);
 				r += mx;
 				l += mn;
 			}
 			p = {l,r};
 			return m <= r and m >= l;
 		};
 		int L = 0,R = 1e18;
 		int ans = 0;
 		while(L <= R){
 			int M = (L + R)/2;
 			if(func(M)){
 				ans = M;
 				R = M-1;
 			}
 			else{
 				L = M+1;
 			}
 		}
 		func(ans);
 		int l = p.x;
 		int r = p.y;
 		vector<int>b(k+1);
 		int sum = m;
 		for(int i = 1; i <= k; i++){
 			int mx = (a[i]*m + ans)/n;
			int mn = (a[i]*m - ans)/n;
			if(mn*n < a[i]*m - ans)mn++;
			l -= mn;
			r -= mx;
			// find y in [mn,mx] such that  y >= 0 and m - y >= l and m - y <= r
			//y <= m - l and y >= m - r
			//cout << l << " " << r << endl;
			b[i] = max(max(0LL,sum-r),mn);
			sum -= b[i];
			cout << b[i] << " ";
 		}
 		cout << endl;
 return 0;
}
signed main(){
    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    #ifdef SIEVE
    sieve();
    #endif
    #ifdef NCR
    init();
    #endif
    int t=1;//cin>>t;
    while(t--){
        solve();
    }
    return 0;
}
 
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i = 0; i < (n); ++i)
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
using ll = long long;
using pii = pair<int, int>;

using C = complex<double>;
const double gs = 0.000001;

int main(){
    int n;
    cin >> n;
    vector<double> lx(n), ly(n), rx(n), ry(n);
    rep(i,n) cin >> lx[i] >> ly[i];
    rep(i,n) cin >> rx[i] >> ry[i];
    double ljx, ljy, rjx, rjy;
    ljx = ljy = rjx = rjy = 0;
    rep(i,n){
        ljx += lx[i];
        ljy += ly[i];
        rjx += rx[i];
        rjy += ry[i];
    }
    ljx /= n; ljy /= n; rjx /= n; rjy /= n;
    rep(i,n){
        lx[i] -= ljx;
        ly[i] -= ljy;
        rx[i] -= rjx;
        ry[i] -= rjy;
    }
    string ans = "No";
    rep(i,n){
        rep(j,n){
            double llen = sqrt(lx[i]*lx[i] + ly[i]*ly[i]);
            double rlen = sqrt(rx[j]*rx[j] + ry[j]*ry[j]);
            if(abs(rlen-llen) >= gs) continue;
            double lshi = atan2(ly[i], lx[i]);
            double rshi = atan2(ry[j], rx[j]);
            double shi = lshi - rshi;
            bool allMitukata = true;
            rep(j2, n){
                C tani(cos(shi), sin(shi));
                C r(rx[j2], ry[j2]);
                r = r*tani;
                double rx2 = r.real(); // kaitenn
                double ry2 = r.imag();
                bool mitukata = false;
                rep(i2, n){
                    if(abs(lx[i2]-rx2)>=gs || abs(ly[i2]-ry2)>=gs) continue;
                    mitukata = true;
                }
                if(!mitukata) allMitukata = false;
            }
            if(allMitukata) ans = "Yes";
        }
    }
    cout << ans << endl;
    return 0;
}