Each test case begins with two positive integers, n (2 <= n <= 10^5) and d (1 <= d <= 3), indicating that their are n points in the d-dimensional space to be given. Then, n lines follow, each containing d integers. The ith of the lines contains coordinates of the ith point. All the coordinates in the input file are at most 106 in absolute value.
1 3 1 0 2 10