m, n = gets.split.map &:to_i
a = (1..m).map{gets.split.map(&:to_f) + [0]}

table = [[0] * n + [1]]

(1..(1<<m)-1).each{|x|
	table[x] = [0] * (n+1) 
	is = (0..m-1).select{|i| x[i] == 1}
	is.each{|i|
		y = x - (1 << i)
		b = a[i]
		t = table[y]
		h = (0..n).map{|j| (1 - b[j]) * t[j]}
		(0..n).each{|c1|	
			prob = 1
			sum = 0
			(c1..n).each{|c2|
				sum += prob * h[c2]
				prob *= b[c2]
			}
			table[x][c1] = sum if sum > table[x][c1]
		}
	}
}
p table[-1][0]