import java.util.*;
import java.lang.*;
import java.io.*;
public class Main
{
{
double n, m;
double x, min = 100, max = -100, sum = 0, a = 0, b = 0;
Scanner in
= new Scanner
(System.
in); n = in.nextDouble();
m = in.nextDouble();
for (int i = 0; i < m; i++){
for (int j = 0; j < n; j ++){
x = in.nextDouble();
if (max == x) a++;
if (max < x) {
if (max != min) sum += a*max;
a = 1;
max = x;
}
if ( min == x) b++;
if (min > x) {
if (max != min) sum += b*min;
b = 1;
min = x;
}
if (x!= min && x != max) sum += x;
}
if(i
== m
-1) System.
out.
printf("%.2f", sum
/ (n
- a
- b
)); else System.
out.
printf("%.2f ", sum
/ (n
- a
- b
)); sum = a = b = 0;
min = 100;
max = -100;
}
}
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgpwdWJsaWMgY2xhc3MgTWFpbgp7CiAgcHVibGljIHN0YXRpYyB2b2lkIG1haW4gKFN0cmluZ1tdIGFyZ3MpIHRocm93cyBqYXZhLmxhbmcuRXhjZXB0aW9uCiAgewogICAgZG91YmxlIG4sIG07CiAgICBkb3VibGUgeCwgbWluID0gMTAwLCBtYXggPSAtMTAwLCBzdW0gPSAwLCBhID0gMCwgYiA9IDA7CiAgICBTY2FubmVyIGluID0gbmV3IFNjYW5uZXIoU3lzdGVtLmluKTsKICAgIG4gPSBpbi5uZXh0RG91YmxlKCk7CiAgICBtID0gaW4ubmV4dERvdWJsZSgpOwogICAgZm9yIChpbnQgaSA9IDA7IGkgPCBtOyBpKyspewogICAgICBmb3IgKGludCBqID0gMDsgaiA8IG47IGogKyspewogICAgICAgIHggPSBpbi5uZXh0RG91YmxlKCk7CiAgICAgICAgaWYgKG1heCA9PSB4KSBhKys7CiAgICAgICAgaWYgKG1heCA8IHgpIHsKICAgICAgICAgIGlmIChtYXggIT0gbWluKSBzdW0gKz0gYSptYXg7CiAgICAgICAgICBhID0gMTsKICAgICAgICAgIG1heCA9IHg7CiAgICAgICAgfQogICAgICAgIGlmICggbWluID09IHgpIGIrKzsKICAgICAgICBpZiAobWluID4geCkgewogICAgICAgICAgaWYgKG1heCAhPSBtaW4pIHN1bSArPSBiKm1pbjsKICAgICAgICAgIGIgPSAxOwogICAgICAgICAgbWluID0geDsKICAgICAgICB9CiAgICAgIGlmICh4IT0gbWluICYmIHggIT0gbWF4KSBzdW0gKz0geDsKICAgICAgfQogICAgICBpZihpID09IG0tMSkgU3lzdGVtLm91dC5wcmludGYoIiUuMmYiLCBzdW0gLyAobiAtIGEgLSBiKSk7CiAgICAgIGVsc2UgU3lzdGVtLm91dC5wcmludGYoIiUuMmYgIiwgc3VtIC8gKG4gLSBhIC0gYikpOwogICAgICBzdW0gPSBhID0gYiA9IDA7CiAgICAgIG1pbiA9IDEwMDsKICAgICAgbWF4ID0gLTEwMDsKICAgIH0KICB9Cn0=