#!/afs/athena/contrib/perl/perl

while(<>){
	split;
	$btot += $_[3];
	$atot += $_[2];
	$n++;
}
$avg = ($btot-$atot)/$n;
print("Average magnitude difference: $avg\n");
