#include <bits/stdc++.h>
#define FOR(i, begin, end) for(int i=(begin);i<(end);i++)
#define IFOR(i, begin, end) for(int i=(end)-1;i>=(begin);i--)
#define rep(i, n) FOR(i,0,n)
#define irep(i, n) IFOR(i,0,n)
#define all(v) begin(v), end(v)
using namespace std;
using ll = long long;
using ull = unsigned long long;
using P = pair<int, int>;
using PLL = pair<ll, ll>;
using VI = vector<int>;
using VLL = vector<ll>;
using VB = vector<bool>;
using VP = vector<P>;
using Graph2 = vector<vector<int>>;
using PQ = priority_queue<int>;
template<typename T>istream& operator>>(istream&s,vector<T>&v){for(auto &i: v)s>>i;return s;}
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; }
bool second_compare(P a,P b){if(a.second!=b.second){return a.second<b.second;} else return true;}

int main() {
    int n;
    cin >> n;
    double x0, y0, xn, yn;
    cin >> x0 >> y0 >> xn >> yn;
    double Ox = (x0 + xn) / 2.0;
    double Oy = (y0 + yn) / 2.0;

    x0 -= Ox;
    y0 -= Oy;
    xn -= Ox;
    yn -= Oy;

    double r = sqrt(x0*x0 + y0*y0);
    double theta = atan2(y0, x0);
    double t = M_PI*2.0 / (double)n + theta;

    printf("%.10f %.10f\n", r*cos(t)+Ox, r*sin(t)+Oy);

    return 0;
}
#include<bits/stdc++.h>
using namespace std;
#define file freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
#define fo(i, strt, end) for(i=strt;strt<end?i<end:i>end;strt<end?i+=1:i-=1)
#define deb(var) cout << #var << " = " << var << endl;
#define deba(i, arr, n) fo(i,0, n){cout << arr[i] << " ";}
#define all(arr) arr.begin(), arr.end()
#define rall(arr) arr.rbegin(), arr.rend()
#define autoDeb(arr) for(auto var:arr) cout<<var<<" ";
#define sa(arr,n) for(int var = 0; var < n; var++) cin >> arr[var];
#define yes cout << "YES\n"
#define no cout << "NO\n"
typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> pii;
typedef map<int,int> mii;
/*************************************/

int main()
{
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    // file;
  ll n;
  cin>>n;
  ll arr[n];
  for(auto &i:arr) cin>>i;
//   autoDeb(arr);cout<<endl;
  ll sum=0;
//   int cs[n];
//   int css[n];
//   for(int i=0;i<n;i++){
//       sum+=arr[i];
//       cs[i]=sum;
//   }
//   sum=0;
//   for(int i=0;i<n;i++){
//       sum+=cs[i];
//       css[i]=sum;
//   }
  ll mx=-1;
  ll CS=0;
  ll CSS=0;
  for(int i=0;i<n;i++){
      mx=max(mx,arr[i]);
      CS+=arr[i];
      CSS+=CS;
      cout<<fixed<<mx*(i+1)+CSS<<endl;

  }
//   sum=accumulate(arr,arr+n,sum);
//   cout<<sum<<endl;
  
  return 0;
}