#include <bits/stdc++.h>
using namespace std;
const int N = (1 << 20) + 5;
int S1[N], S2[N];
long long G[45];
int main() {
  int n, k;
  cin >> n >> k;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) {
      int x;
      cin >> x;
      if (x) G[i] |= 1LL << j;
    }
  int ans = 0;
  int s1 = n / 2, s2 = n - s1;
  for (int x = 0; x < (1 << s1); x++) {
    for (int i = 0; i < s1; i++)
      if (!(x >> i & 1)) {
        S1[x | (1 << i)] = max(S1[x | (1 << i)], S1[x] + (x == (G[i] & x)));
      }
    ans = max(ans, S1[x]);
  }
  for (int x = 0; x < (1 << s2); x++) {
    for (int i = 0; i < s2; i++)
      if (!(x >> i & 1)) {
        S2[x | (1 << i)] =
            max(S2[x | (1 << i)], S2[x] + (x == ((G[i + s1] >> s1) & x)));
      }
    ans = max(ans, S2[x]);
  }
  for (int x = 0; x < (1 << s1); x++) {
    int t = (1 << s2) - 1;
    for (int i = 0; i < s2; i++) {
      if (x != (G[i + s1] & x)) t ^= 1 << i;
    }
    ans = max(ans, S1[x] + S2[t]);
  }
  double x = 1.0 * k / ans;
  x = x * x * (ans - 1) * ans / 2;
  printf("%.8lf", x);
}
