#include<iostream>
#include<cstdio>
#include<algorithm>
#include<vector>

using namespace std;

int main(){
  int n,m;
  double In;
 
  while(cin >> n >> m && n && m){
    vector<double> matrix[n];
    double mex = 0,sam[n];
    for(int i=0;i<n;i++)sam[i] = -1;
    for(int i=0;i<n;i++){
      for(int j=0;j<n;j++){
	cin >> In;
	matrix[i].push_back(In);
	sam[j] = max(sam[j],In);
      }
    }

    mex = 1;
    for(int i=0;i<m-1;i++)mex*=sam[i];
    
    printf("%.2f\n",mex);


  }
  return 0;
}