#include <bits/stdc++.h>
#define f(i,j,k) for(long long i=j;i<k;i++)
#define f2(i,j,k) for(long long i=j;i>=k;i--)
#define ll long long 
#define ld long double 
using namespace std;
const long long mod=1e9+7;
const long long mod2=998244353;
const long long INF = (1 << 29);
void chmin(int& a, int b){ if(a > b) a = b; }
void chmax(int& a, int b){ if(a < b) a = b; }
void yn(ll a){
    if(a==0){
        cout<<"Yes"<<endl;
    }
    else{
        cout<<"No"<<endl;
    }
}
int main(){
    string s,t,u;
    ll a,b,c,d,e,n,k,ans=0,ans3=0;
    ld x,y,z,ans2=0;
    cin>>n;
    f(i,0,n){
        cin>>x;
        ans+=abs(x);
        ans2+=x*x;
        a=abs(x);
        ans3=max(ans3,a);
    }
    cout<<ans<<endl;
    cout<<fixed<<setprecision(10)<<sqrt(ans2)<<endl;
    cout<<ans3<<endl;
    return 0;
}

#include <bits/stdc++.h>

#define repd(i, a, b) for (ll i = (a); i < (b); i++)
#define repb(i, n) for (ll i = (n)-1; i >= 0; i--)
#define rep(i, n) repd(i, 0, n)

using namespace std;

using ll = long long;
using ul = unsigned long long;
using ld = long double;
const ul mod = 1000000007;

void output(ll a, ll b, ll c, ll d) {
    cout << a << " " << b << " " << c << " " << d << endl;
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    ll n;
    cin >> n;
    vector<ll> x(n), y(n), r(n);
    rep(i, n) { cin >> x[i] >> y[i] >> r[i]; }

    rep(i, n) { output(x[i], y[i], x[i] + 1, y[i] + 1); }
    return 0;
}

