#include <bits/stdc++.h>
using namespace std;
const int N = 50;
int n, m, k, Max[1 << 20];
bitset<N> go[N], now;
void dfs(int p, int cnt, bitset<N> now) {
  if (p == n) {
    int S = 0;
    for (int i = 0; i < m; i++)
      if (now[i]) S |= (1 << i);
    Max[S] = max(Max[S], cnt);
    return;
  }
  dfs(p + 1, cnt, now);
  if (now[p]) dfs(p + 1, cnt + 1, now & go[p]);
}
int ans;
void solve(int p, int cnt, int S, bitset<N> now) {
  if (p == m) return void(ans = max(ans, cnt + Max[S]));
  solve(p + 1, cnt, S, now);
  if (now[p]) solve(p + 1, cnt + 1, S | (1 << p), now & go[p]);
}
int main() {
  scanf("%d%d", &n, &k);
  if (n == 0) return printf("%.12lf\n", 0.0), 0;
  for (int i = 0; i < n; i++) {
    int x;
    for (int j = 0; j < n; j++) scanf("%d", &x), go[i][j] = x;
  }
  m = n >> 1;
  for (int i = 0; i < n; i++) now[i] = 1;
  dfs(m, 0, now);
  for (int i = 0; i < m; i++)
    for (int S = 0; S < (1 << m); S++)
      if (S >> i & 1) Max[S ^ (1 << i)] = max(Max[S ^ (1 << i)], Max[S]);
  solve(0, 0, 0, now);
  printf("%.12lf\n", 0.5 * k * k * (ans - 1) / ans);
  return 0;
}
