#include <bits/stdc++.h>
using namespace std;
int n, k;
int g[47][47];
int adj[47];
int dp[2097777];
int main() {
  cin >> n >> k;
  if (n == 1) {
    cout << 0 << endl;
    return 0;
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      cin >> g[i][j];
    }
  }
  int mid = (n / 2);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < mid; j++) {
      if (g[i][j] == 1) adj[i] += (1 << j);
    }
  }
  for (int i = 0; i < mid; i++) {
    dp[(1 << i)] = 1;
  }
  for (int i = 0; i <= (1 << mid) - 1; i++) {
    vector<int> pt;
    for (int j = 0; j < mid; j++) {
      if (i & (1 << j)) pt.push_back(j);
    }
    bool ok = true;
    for (int j = 0; j < pt.size(); j++) {
      for (int k = j + 1; k < pt.size(); k++) {
        if (g[pt[j]][pt[k]] == 0) {
          ok = false;
          break;
        }
      }
      if (ok == false) break;
    }
    if (ok == false) continue;
    dp[i] = pt.size();
  }
  for (int i = 0; i <= (1 << mid) - 1; i++) {
    for (int j = 0; j < mid; j++) {
      if (i & (1 << j)) dp[i] = max(dp[i], dp[i ^ (1 << j)]);
    }
  }
  int ans = dp[(1 << mid) - 1];
  for (int i = 0; i <= (1 << (n - mid)) - 1; i++) {
    vector<int> pt;
    for (int j = 0; j < n - mid; j++) {
      if (i & (1 << j)) pt.push_back(j + mid);
    }
    bool ok = true;
    for (int j = 0; j < pt.size(); j++) {
      for (int k = j + 1; k < pt.size(); k++) {
        if (g[pt[j]][pt[k]] == 0) {
          ok = false;
          break;
        }
      }
      if (ok == false) break;
    }
    if (ok == false) continue;
    int cp = (1 << mid) - 1;
    for (int j = 0; j < pt.size(); j++) {
      cp &= adj[pt[j]];
    }
    ans = max(ans, dp[cp] + (int)pt.size());
  }
  cout << fixed << setprecision(12)
       << (double)ans * (ans - 1) * ((double)k / ans) * ((double)k / ans) / 2
       << endl;
  return 0;
}
