#include <bits/stdc++.h>
using namespace std;
const long double PI = acos(-1);
const int INF = 2e9 + 5;
const long long LINF = 1e18 + 5;
const long long MOD = 1e9 + 7;
int n;
int ans = 0;
long long adj[65];
int f(long long x) {
  int r = 0;
  while (x % 2 == 0) {
    x /= 2;
    ++r;
  }
  return r;
}
void clique2(int r, long long p, long long x) {
  if (p == 0 && x == 0) {
    ans = max(ans, r);
  }
  if (p == 0) return;
  int u = f(p | x);
  long long c = p & ~adj[u];
  while (c) {
    int v = f(c);
    clique2(r + 1, p & adj[v], x & adj[v]);
    p ^= (1LL << v);
    x |= (1LL << v);
    c ^= (1LL << v);
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  ;
  int k;
  cin >> n >> k;
  int x;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      cin >> x;
      if (x == 1) {
        adj[i] |= (1LL << j);
        adj[j] |= (1LL << i);
      }
    }
  }
  clique2(0, (1LL << n) - 1, 0);
  double ret = double(k) * double(k) * (ans - 1);
  ret /= (2 * ans);
  cout << fixed << setprecision(10) << ret << endl;
  return 0;
}
