# Enter your code here. Read input from STDIN. Print output to STDOUT
import numpy

n, m = map(int, raw_input().split())
a = numpy.array([raw_input().split() for _ in xrange(n)], int)

print numpy.mean(a, axis=1)
print numpy.var(a, axis=0)
print numpy.std(a, None)

401ed2a6643cb88c813c925f5324a89fe4de3a14
# Enter your code here. Read input from STDIN. Print output to STDOUT
import numpy

n, m = map(int, raw_input().split())
a = numpy.array([raw_input().split() for _ in xrange(n)], int)

print numpy.mean(a, axis=1)
print numpy.var(a, axis=0)
print numpy.std(a, None)
