#include <bits/stdc++.h>
#define INF INT_MAX
#define ll  long long
#define ull unsigned long long
#define rep(i,n) for(ll i=0; i<n; ++i)
#define FOR(i, s, e) for(ll i=s; i<e; ++i)
#define MOD 1000000007
using namespace std;
template<class T> inline bool chmin(T& a, T b) { if(a>b) {a=b; return true;} return false;}
template<class T> inline bool chmax(T& a, T b) { if(a<b) {a=b; return true;} return false;}

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int N; cin >> N;
  vector<double> X(N);
  rep(i,N) cin >> X[i];
  double m = 0, u = 0, c = 0;
  rep(i,N) {
    m+=abs(X[i]);
    u+=(X[i] * X[i]);
    c = max(c, abs(X[i]));
  }
  cout << setprecision(20) << m << endl;
  cout << sqrt(u) << endl;
  cout << c << endl;
}

#include "bits/stdc++.h"
using namespace std;
using LLI = long long;
#define INF 999999999
#define MOD 1000000007
#define FOR(i, s, e) for(LLI i = s, i##_lim = (e); i < i##_lim; i++)
#define FORR(i, s, e) for(LLI i = s-1, i##_lim = (e); i##_lim<=i; i--)
#define REP(i, n) FOR(i,0,n)
#define REPR(i, n) FORR(i,n,0)
#define chmax(a, b) a = max(a, b)
#define chmin(a, b) a = min(a, b)
#define bit(a, shift) ((a>>shift)&1))
#define pm(a) ((a)?1:-1)
#define SORT(v) sort(v.begin(),v.end())
#define RSORT(v) sort((v).rbegin(), (v).rend())
#define Mat2(type,name,h,w,def) vector<vector<type>> name(h,vector<type>(w, def))
#define Mat3(type,name,h,w,d,def) vector<vector<vector<type>>> name(h,vector<vector<type>>(w, vector<int>(d,def)))
// int 2.14E±9    LLIi 9.2E±18    double 1.7E±380

#define PI 3.1415926535
int main()
{
	cout << fixed << setprecision(10);

	int n;
	cin >> n;

	double x0, y0, x, y;
	cin >> x0 >> y0 >> x >> y;

	double th = atan2(-(y - y0), x - x0);

	th -= 2 * PI / n;

	double len = sqrt((x - x0) * (x - x0) + (y - y0) * (y - y0)) / 2;
	//cout << len * cos(th - 2 * PI / n) << " " << len * sin(th - 2 * PI / n);
	cout << (x + x0) / 2 - len * cos(th) << " " << (y + y0) / 2 + len * sin(th);

	return 0;
}