#include <stdio.h>

int main() {
    int n;
    scanf("%d", &n);

    int stu[100][4];
    int t[100];
    int i,j;

    for (i = 0; i < n; i++) {
        for (j = 0; j < 4; j++) {
            scanf("%d", &stu[i][j]);
        }
    }

    for (i = 0; i < n; i++) {
        t[i] = 0;
        for (j = 0; j < 4; j++) {
            t[i] += stu[i][j];
        }
    }

    double totalAvg = 0;
    for (i = 0; i < n; i++) {
        totalAvg += t[i];
        printf("%d ", t[i]);
    }
    printf("\n");

    for (i = 0; i < n; i++) {
        double avg = (double)t[i] / 4;
        printf("%.2f ", avg);
    }
    printf("\n");

    totalAvg /= n;
    printf("%.2f\n", totalAvg/4);

    return 0;
}
