//============================================================================
// Name        : B.cpp
// Author      : NewtonGn
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <bits/stdc++.h>

using namespace std;

#define R >>
#define W <<
#define F first
#define S second
#define ALL(v) v.begin(), v.end()
#define Pb push_back
#define EMPB emplace_back
#define MKP make_pair
#define FOR(i,a,n) for(int i = (int)a; i< (int)n; i++)
#define rFOR(i,n,a) for(int i = (int)n; i>=(int)n; i--)
#define ACCELERATE ios::sync_with_stdio(0); cin.tie(0);
#define inf  (int)1e9
#define infLL (ll)1e18
#define nl '\n'
#define ll long long

/*/-----------------------Modular Arithmetic---------------/*/

const long long mod = 998244353;

ll ch(ll x, ll n){
    x--;
    return max( 0ll, x -max(0ll, 2*(x-n)));
}
bool srt(pair<pair<ll,ll>,ll> a, pair<pair<ll,ll>,ll> b){
    if(a.F.F == b.F.F) return a.F.S <  b.F.S;
    return a.F.F < b.F.F ;
}
void solve(){
    double  n, a, b,k, w, d, c,h, m, ans;

       cin R n R  w;
 ll x ,y;
     d =  sqrt( n*n/4 - w);
     x = ( ll) (n/2 + d);
     y =  (ll) (n/2 -d);
    if(x+y == (ll) n && x*y == (ll) w) cout W "Yes";
    else cout W "No";

}

int main(){
  ACCELERATE;

  int t=1;
 //cin R t;

  while(t--){
     // auto start = clock();

      solve();

      // start = clock() - start;
      // cout W "it took " W fixed W  setprecision(20)  W double(start) W '\n';
  }



    return 0;
}






#include<iostream>
#include<iomanip>
#include<string>
#include<algorithm>
#include<vector>
#include<utility>
#include<tuple>
#include<map>
#include<queue>
#include<stack>
#include<deque>
#include<bitset>
#include<math.h>
#include<numeric>
using namespace std;
using ll = int64_t;
using Graph = vector<vector<int> >;
const ll M = 1000000007;

int main(){
  int n;
  cin >> n;
  vector<ll> a(n);
  for(int i=0;i<n;i++) cin >> a[i];
  ll sum=0;
  vector<ll> s(n);
  for(int i=0;i<n;i++){
    sum+=a[i];
    s[i]=sum;
  }
  vector<ll> ss(n);
  ll ssum=0;
  for(int i=0;i<n;i++){
    ssum+=s[i];
    ss[i]=ssum;
  }

  ll tmp=a[0];
  ll ans=0;
  cout << 2*a[0] << endl;
  for(int i=1;i<n;i++){
    tmp=max(tmp,a[i]);
    ll x=tmp*(i+1);
    //cout << s[i] << ' ' << ss[i-1] << ' ' << x << endl;
    cout << s[i]+ss[i-1]+x << endl;
  }
}
