#include <bits/stdc++.h>
using namespace std;
const double g = 10.0, eps = 1e-12;
const int N = 50 + 10, maxn = 1200000 + 10, inf = 0x3f3f3f3f,
          INF = 0x3f3f3f3f3f3f3f3f;
int ans, cnt[N], group[N], vis[N];
int n, a[N][N];
bool dfs(int u, int pos) {
  for (int i = u + 1; i <= n; i++) {
    if (cnt[i] + pos <= ans) return 0;
    if (a[u][i]) {
      int j;
      for (j = 0; j < pos; j++)
        if (!a[i][vis[j]]) break;
      if (j == pos) {
        vis[pos] = i;
        if (dfs(i, pos + 1)) return 1;
      }
    }
  }
  if (pos > ans) {
    for (int i = 0; i < pos; i++) group[i] = vis[i];
    ans = pos;
    return 1;
  }
  return 0;
}
void maxclique() {
  ans = -1;
  for (int i = n; i; i--) {
    vis[0] = i;
    dfs(i, 1);
    cnt[i] = ans;
  }
}
int main() {
  int k;
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) scanf("%d", &a[i][j]);
  maxclique();
  printf("%.12f\n", 1.0 * k / ans * k / ans * ans * (ans - 1) / 2);
  return 0;
}
