#include <bits/stdc++.h>
using namespace std;
const int maxn = 50;
long long g[maxn];
int ans, n;
inline int ctz(long long s) {
  return s ? __builtin_ctzll(s) : 8 * sizeof(long long);
}
void BronKerbosch(long long clique, long long allow, long long forbid) {
  if (!allow && !forbid) {
    ans = max(ans, __builtin_popcountll(clique));
    return;
  }
  if (!allow) return;
  int pivot = ctz(allow | forbid);
  long long choose = allow & ~g[pivot];
  for (int u = ctz(choose); u < n; u += ctz(choose >> (u + 1)) + 1) {
    BronKerbosch(clique | (1LL << u), allow & g[u], forbid & g[u]);
    allow ^= 1LL << u;
    forbid |= 1LL << u;
  }
}
int main(int argc, char const *argv[]) {
  ios_base::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  int k;
  long long x;
  cin >> n >> k;
  memset(g, 0, sizeof(g));
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      cin >> x;
      g[i] ^= (x << j);
    }
  }
  BronKerbosch(0LL, (1LL << n) - 1, 0LL);
  printf("%.9f\n", 1.0 * k * k * (ans - 1) / (2 * ans));
  return 0;
}
