//#include <atcoder/all>
//using namespace atcoder;
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i, n) for(int i=0; i<n; i++)
#define REPR(i, n) for(int i=n-1; i>=0; i--)
#define FOR(i, m, n) for(int i=m; i<n; i++)
#define ALL(v) v.begin(), v.end()
#define bit(n) (1LL<<(n))
#define FIX(d) fixed << setprecision(d)
using P = pair<int, int>;
using LP = pair<ll, ll>;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const int INF = 1e9;
const ll LINF = (1LL<<60);

unsigned int xor128(){
  static unsigned int x=123456789,y=362436069,z=521288629,w=88675123;
  unsigned int t = (x^(x<<11));
  x=y; y=z; z=w; 
  return( w=(w^(w>>19))^(t^(t>>8)) );
}

int n;
int cx[200], cy[200], r[200];
int a[200], b[200], c[200], d[200];

ll score(){
  double sc = 0.0;
  REP(i,n){
    int area = (c[i]-a[i]) * (d[i]-b[i]);
    double tmp = 1.0 - (double)min(area,r[i])/max(area,r[i]);
    sc += 1e9 - 1e9*tmp*tmp;
  }
  return (ll)round(sc/n);
}

ll score_dx(int ind){
  int area = (c[ind]-a[ind]+1) * (d[ind]-b[ind]);
  double tmp = 1.0 - (double)min(area,r[ind])/max(area,r[ind]);
  tmp = 1e9 - 1e9*tmp*tmp;
  return (ll)round(tmp/n);
}

ll score_dy(int ind){
  int area = (c[ind]-a[ind]) * (d[ind]-b[ind]+1);
  double tmp = 1.0 - (double)min(area,r[ind])/max(area,r[ind]);
  tmp = 1e9 - 1e9*tmp*tmp;
  return (ll)round(tmp/n);
}

void init(){
  REP(i,n){
    a[i] = cx[i];
    b[i] = cy[i];
    c[i] = cx[i]+1;
    d[i] = cy[i]+1;
  }
}

int main(){
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> n;
  REP(i,n) cin >> cx[i] >> cy[i] >> r[i];

  int ti = clock();
  init();
  ll mx = score();
  //cout << mx << endl;
  while(clock() - ti < 490 * CLOCKS_PER_SEC / 100){ 
    REP(loop, 300){
      int ind = xor128() % n;
      int xy = xor128() % 2;
      bool minus = false, plus = false;
      if(xy==0){
        REP(i,n){
          if(i==ind) continue;
          if(max(a[i],a[ind]-1)<min(c[i],c[ind]) && max(b[i],b[ind])<min(d[i],d[ind])){
            minus = true;
          }
          if(max(a[i],a[ind])<min(c[i],c[ind]+1) && max(b[i],b[ind])<min(d[i],d[ind])){
            plus = true;
          }
        }

        if(c[ind]<10000 && !plus){ 
          c[ind]++;
          if(!chmax(mx, mx+score_dx(ind))) c[ind]--;
        }else if(a[ind]>0 && !minus){ 
          a[ind]--;
          if(!chmax(mx, mx+score_dx(ind))) a[ind]++; 
        }
      }else{
        REP(i,n){
          if(i==ind) continue;
          if(max(a[i],a[ind])<min(c[i],c[ind]) && max(b[i],b[ind]-1)<min(d[i],d[ind])){
            minus = true;
          }
          if(max(a[i],a[ind])<min(c[i],c[ind]) && max(b[i],b[ind])<min(d[i],d[ind]+1)){
            plus = true;
          }
        }
        if(d[ind]<10000 && !plus){ 
          d[ind]++;
          if(!chmax(mx, mx+score_dy(ind))) d[ind]--;
        }else if(b[ind]>0 && !minus){ 
          b[ind]--;
          if(!chmax(mx, mx+score_dy(ind))) b[ind]++; 
        }
      }
    }
    //cout << mx << endl;
  }
  //cout << mx << endl;
  REP(i,n) cout << a[i] << " " << b[i] << " " << c[i] << " " << d[i] << '\n';
  return 0;
}

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

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<ll, int> pli;
typedef pair<int, ll> pil;
typedef vector<pii> vii;
typedef vector<pil> vil;
typedef vector<pli> vli;
typedef vector<pll> vll;

#define FIO ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define sz size()
#define all(a)  a.begin(), a.end()
#define mem(a, b)     memset(a, b, sizeof(a))
#define f0(i,n) for(int i=0;i<(n);i++)
#define f1(i,n) for(int i=1;i<=(n);i++)
#define f2(i,a,n) for(int i=(a);i<=(n);i++)
#define fr(i,n,a) for(int i=(n);i>=(a);i--)
#define rep(i,a,b,c) for(int i=(a);i!=(b);i+=(c))
#define nl "\n"


const int INF = 1e9 + 5;
const int MXN = 2e5 + 5;
const ll LMXN = 1e14;
const int MOD = 1e9 + 7;
ll cs = 0;

void solve(){
    int n; cin >> n;
    ll ans1 = 0, ans3 = 0;
    double ans2 = 0;
    f0(i, n){
        ll a; cin >> a;
        ans1 += abs(a);
        ans2 += abs(a)*abs(a);
        ans3 = max(ans3, abs(a));
    }
    cout << fixed << setprecision(15);
    cout << ans1 << nl;
    cout << sqrt(ans2) << nl;
    cout << ans3 << nl;

}

int main(){
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    //FIO;
    ll t = 1;
    //cin >> t;
    while(t--){
        solve();
    }
    return 0;
}
