#include <bits/stdc++.h>
using namespace std;
const int maxn = 45;
const int half = 21;
int N, hN;
int G[maxn][maxn];
int f[1 << half];
int used[maxn];
void left(int cur, int mask) {
  if (cur == hN) {
    f[mask] = __builtin_popcount(mask);
    return;
  }
  left(cur + 1, mask);
  for (int i = 0; i < hN; ++i)
    if (used[i] && !G[i][cur]) return;
  used[cur] = 1;
  left(cur + 1, mask + (1 << cur));
  used[cur] = 0;
}
int ans = 0;
void right(int cur, int num, int left) {
  if (cur == N) {
    ans = max(ans, f[left] + num);
    return;
  }
  right(cur + 1, num, left);
  for (int i = hN; i < N; ++i)
    if (used[i] && !G[i][cur]) return;
  for (int i = 0; i < hN; ++i)
    if ((left & (1 << i)) && !G[i][cur]) left ^= (1 << i);
  used[cur] = 1;
  right(cur + 1, num + 1, left);
  used[cur] = 0;
}
int main() {
  int K;
  cin >> N >> K;
  hN = N / 2;
  for (int i = 0; i < N; ++i)
    for (int j = 0; j < N; ++j) cin >> G[i][j];
  left(0, 0);
  for (int i = 0; i < (1 << hN); ++i)
    for (int j = 0; j < hN; ++j)
      if (i & (1 << j)) f[i] = max(f[i], f[i ^ (1 << j)]);
  right(hN, 0, (1 << hN) - 1);
  cout << setprecision(10) << fixed << (ans - 1) / (2.0L * ans) * K * K << endl;
}
