#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
const int MOD = 1e9 + 7;
long long cities[41];
int ans = 0;
void clique(long long msk, int sz) {
  if (msk == 0) {
    ans = max(sz, ans);
    return;
  }
  while (msk) {
    if (__builtin_popcountll(msk) + sz < ans) return;
    long long i = __builtin_ffsll(msk) - 1;
    msk ^= (1LL << i);
    clique(msk & cities[i], sz + 1);
  }
}
int main() {
  int n, k;
  cin >> n >> k;
  if (n == 1) return puts("0");
  for (int i = 0; i < n; i++) {
    int a;
    long long tot = 0;
    for (int j = 0; j < n; j++) {
      cin >> a;
      if (a) tot |= (1LL << j);
    }
    tot |= (1LL << i);
    cities[i] = tot;
  }
  clique((1LL << n) - 1, 0);
  cout << fixed << setprecision(9) << k * k * (ans - 1) / (ans * (2.0)) << endl;
}
