
#include<iostream>
#include<cmath>
#include<iomanip>
using namespace std;

int main()
{
  double d, c;
  int n, m;
  cout<<setprecision(2);
  cout<<setiosflags(ios::fixed);
  while (cin>>n>>m, n) {
    n *= n;
    c = 0.0;
    while (n-- > 0) {
      cin>>d;
      if (c < d) c = d;
    }
    cout<<pow(c, m-1)<<endl;
  }
  return 0;
}