#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("fast-math")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
void da(int *a, int s, int e) {
  for (int i = s; i < e; i++) cout << a[i] << " ";
}
void db(string s) { cout << s << '\n'; }
void cp(int *a, int *b, int n) {
  for (int i = 0; i < n; i++) b[i] = a[i];
}
void de(int a) { cout << a << " <\n"; }
const long long N = 1e5 + 10, MOD = 1e9 + 7, INF = 1e15 + 10, LOG = 20;
long long g[N];
int dp[2][1 << LOG];
inline double calc(double k, int n) { return k * k / 2 * (n - 1) / n; }
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, k;
  cin >> n >> k;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) {
      long long x;
      cin >> x;
      g[i] ^= x << j;
    }
  int n2 = n / 2;
  for (int mask = 0; mask < 1 << n2; mask++)
    if (mask) {
      int u = 63 - __builtin_clzll(mask);
      dp[0][mask] = max(dp[0][mask ^ 1LL << u], dp[0][mask & g[u]] + 1);
    }
  int M = n - n2, ans = 0;
  for (int mask = 0; mask < 1 << M; mask++) {
    if (mask) {
      int u = 63 - __builtin_clzll(mask);
      dp[1][mask] =
          max(dp[1][mask ^ 1LL << u], dp[1][mask & (g[u + n2] >> n2)] + 1);
    }
    int T = (1 << n2) - 1;
    for (int i = 0; i < M; i++)
      if (mask >> i & 1) T &= g[i + n2];
    ans = max(ans, dp[1][mask] + dp[0][T]);
  }
  cout << fixed << setprecision(10) << calc(k, ans) << "\n";
}
