#include <bits/stdc++.h>
using namespace std;
const int N = 40;
int ans = 0;
int l[1 << (N / 2)];
int fl, cl, n;
double k;
bool A[N][N];
bool checkl(int x) {
  for (int i = (0); i < (fl); ++i)
    for (int j = (i + 1); j < (fl); ++j) {
      if ((x & (1 << j)) && (x & (1 << i)) && !A[i][j]) return 0;
    }
  return 1;
}
bool checkr(int x) {
  for (int i = (0); i < (cl); ++i)
    for (int j = (i + 1); j < (cl); ++j) {
      if ((x & (1 << j)) && (x & (1 << i)) && !A[i + fl][j + fl]) return 0;
    }
  return 1;
}
int maker(int x) {
  int ans = (1 << fl) - 1;
  for (int i = (0); i < (cl); ++i)
    for (int j = (0); j < (fl); ++j) {
      if ((x & (1 << i)) && !A[i + fl][j]) ans = (ans | (1 << j)) ^ (1 << j);
    }
  return ans;
}
int main() {
  ios::sync_with_stdio(false), cin.tie(0);
  ;
  cin >> n >> k;
  fl = n / 2, cl = (n + 1) / 2;
  for (int i = (0); i < (n); ++i)
    for (int j = (0); j < (n); ++j) cin >> A[i][j];
  for (int i = (0); i < (1 << fl); ++i) {
    l[i] = 0;
    if (checkl(i))
      l[i] = __builtin_popcount(i);
    else {
      for (int j = (0); j < (fl); ++j)
        l[i] = max(l[i], l[(i | (1 << j)) ^ (1 << j)]);
    }
  }
  for (int i = (0); i < (1 << cl); ++i) {
    if (checkr(i)) ans = max(ans, __builtin_popcount(i) + l[maker(i)]);
  }
  cout << fixed << setprecision(9);
  cout << (k / ans) * (k / ans) * (ans * (ans - 1) / 2) << '\n';
}
