#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];
void clique(long long r, long long p, long long x) {
  if (p == 0 && x == 0) {
    int tt = 0;
    for (int i = 0; i < n; ++i) {
      if ((1LL << i) & r) ++tt;
    }
    ans = max(ans, tt);
    return;
  }
  int pivot = -1;
  int menor = INF;
  for (int i = 0; i < n; i++) {
    if (((1LL << i) & p) || ((1LL << i) & x)) {
      int x = __builtin_popcountll(p & (~(adj[i])));
      if (x < menor) {
        pivot = i;
        menor = x;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    if ((1LL << i) & p) {
      if (pivot != -1 && adj[pivot] & (1LL << i)) continue;
      clique(r | (1LL << i), p & adj[i], x & adj[i]);
      p = p ^ (1LL << i);
      x = x | (1LL << i);
    }
  }
}
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);
      }
    }
  }
  clique(0, (1LL << n) - 1, 0);
  double ret = double(k) * double(k) * (ans - 1);
  ret /= (2 * ans);
  cout << fixed << setprecision(10) << ret << endl;
  return 0;
}
