loop do
  n,m = gets.split.map(&:to_i)
  break if n == 0 and m == 0

  data = n.times.map{gets.split.map(&:to_f)}
  s = n.times.map do |i|
    prod = 1.0
    (m-1).times do
      prod *= data[i].max
      i = data[i].index(data[i].max)
    end
    prod
  end.max
  puts ("%.2f" % s)
end