#include <bits/stdc++.h>
using namespace std;
int n, k, ans;
int p[50];
long long e[50], can;
int main() {
  srand(time(0));
  scanf("%d %d", &n, &k);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      long long x;
      scanf("%I64d", &x);
      e[i] |= x << j;
    }
  }
  for (int i = 0; i < n; i++) p[i] = i;
  for (int runs = 0; runs < 25000; runs++) {
    random_shuffle(p, p + n);
    can = (1ll << n) - 1;
    int tmp = 0;
    for (int i = 0; i < n; i++) {
      if (can >> p[i] & 1) tmp++, can &= e[p[i]];
    }
    ans = max(ans, tmp);
  }
  printf("%.10lf\n", 0.5 * k * k * (ans - 1) / ans);
}
