#include <bits/stdc++.h>
const int C = 1 << 21, D = 41, G = 21;
int gr[D][D], fcl[2][C], dcl[C], twop[C], LM[C], RM[C], nbits[C], pw[22];
void find_clique(int b, int e, int p, int x) {
  int i;
  fcl[x][0] = 1;
  if (e < b) return;
  for (i = 1; i < pw[e - b + 1]; i++) {
    if (fcl[x][pw[RM[i]] ^ i] && fcl[x][pw[LM[i]] ^ i] &&
        gr[LM[i] + p][RM[i] + p])
      fcl[x][i] = 1;
  }
}
void high_clique(int n) {
  int i, j;
  if (n < 0) return;
  for (i = 1; i < pw[n + 1]; i++) {
    if (fcl[1][i] == 1) dcl[i]++;
    for (j = 0; j < n; j++) {
      dcl[i | pw[j]] =
          ((dcl[i | pw[j]]) > (dcl[i])) ? (dcl[i | pw[j]]) : (dcl[i]);
    }
  }
}
void sbit(int p, int n) {
  int i, j;
  for (j = p; j < n; j++) twop[0] += pw[j - p];
  if (n - p < 0) return;
  for (i = 1; i < pw[p]; i++) {
    if (LM[i] == RM[i]) {
      for (j = p; j < n; j++) {
        if (gr[LM[i]][j] == 1) twop[i] = twop[i] + pw[j - p];
      }
    } else
      twop[i] = twop[i ^ pw[LM[i]]] & twop[pw[LM[i]]];
  }
}
int main() {
  int n, i, j;
  double k, l;
  long long mx = 0;
  pw[0] = 1;
  for (i = 1; i <= G; i++) pw[i] = pw[i - 1] * 2;
  nbits[1] = 1;
  for (i = 2; i < C; i++) {
    LM[i] = LM[i / 2] + 1;
    RM[i] = ((i % 2 == 1) ? (0) : (RM[i / 2] + 1));
    nbits[i] = nbits[i / 2] + ((i % 2 == 1) ? (1) : (0));
  }
  scanf("%d %lf", &n, &k);
  for (i = 0; i < n; i++) {
    for (j = 0; j < n; j++) {
      scanf("%d", &gr[i][j]);
    }
    gr[i][i] = 1;
  }
  find_clique(0, G - 2, 0, 0);
  find_clique(G - 1, n - 1, G - 1, 1);
  high_clique(n - G + 1);
  sbit(G - 1, n);
  for (i = 0; i < pw[G]; i++)
    if (fcl[0][i] * (nbits[i] + dcl[twop[i]]) > mx)
      mx = fcl[0][i] * (nbits[i] + dcl[twop[i]]);
  l = (1.0 * k) / mx, k = 0.5 * mx * (mx - 1);
  printf("%.6lf\n", l * l * k);
  return 0;
}
