#!/usr/bin/perl

$nc = 5;

while(<>){
    my @point = split;
    push(@data, \@point);
}
$cn = 0;
foreach $d (@data){
    $cn = 0 if($cn == $nc);
    my @tot = @{$tot[$cn]};
    my @da = @$d;
    for $i (0..$#tot){
	$tot[$i] += $da[$i];
    }
    $tot[$cn] = \@tot;
    $ct[$cn]++;
    $cn++;
}

for $c (0..$nc-1) {
    $clust[$c] = $tot[$cn]
}
