#include <bits/stdc++.h>
using namespace std;
int n, k, ans;
bool mp[105][105];
int home[105];
void work(int pos, int cnt) {
  ans = max(ans, cnt);
  if (pos > n) return;
  if (n - pos + 1 + cnt <= ans) return;
  work(pos + 1, cnt);
  bool flg = true;
  for (int i = 1; i <= cnt; i++)
    if (!mp[pos][home[i]]) {
      flg = false;
      break;
    }
  if (flg) {
    home[cnt + 1] = pos;
    work(pos + 1, cnt + 1);
  }
}
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) scanf("%d", &mp[i][j]);
  work(1, 0);
  printf("%.12lf\n", 0.5 * (ans - 1) / ans * k * k);
  return 0;
}
