#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:512000000")
using namespace std;
const long long MAX = 100000000LL * 100000000LL;
const long long MIN = numeric_limits<long long>::min();
const double PI = 3.14159265358979;
const long long MOD = 1000000007LL;
template <class T>
ostream& operator<<(ostream& out, vector<T>& v) {
  for (int i = 0; i < v.size(); ++i) out << v[i] << " ";
  return out;
}
template <class T>
istream& operator>>(istream& in, vector<T>& v) {
  for (int i = 0; i < v.size(); ++i) in >> v[i];
  return in;
}
template <class L, class R>
istream& operator>>(istream& in, pair<L, R>& p) {
  in >> p.first >> p.second;
  return in;
}
template <class T>
T lexical_cast(string& s) {
  stringstream ss(s);
  T t;
  ss >> t;
  return t;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long cdiv(long long a, long long b) { return (a + b - 1) / b; }
long long inv(long long n, long long mod) {
  long long pow = mod - 2;
  long long ans = 1;
  long long cur = n;
  while (pow > 0) {
    if (pow & 1) {
      ans *= cur;
      ans %= mod;
    }
    pow /= 2;
    cur *= cur;
    cur %= mod;
  }
  return ans;
}
template <class Cont>
void sort(Cont& c) {
  sort(begin(c), end(c));
}
template <class Cont>
void reverse(Cont& c) {
  reverse(begin(c), end(c));
}
int clique(unsigned long long R, unsigned long long P, unsigned long long X,
           vector<unsigned long long>& e) {
  if (P == 0 && X == 0) return bitset<50>(R).count();
  int maxcl = 0;
  int pivot = 0;
  while (!(((P | X) >> pivot) & 1)) {
    pivot++;
  }
  for (unsigned long long i = 0; i < e.size(); ++i) {
    if ((P & ~e[pivot]) & ((unsigned long long)1 << i)) {
      maxcl = max(maxcl, clique(R | ((unsigned long long)1 << i), P & e[i],
                                X & e[i], e));
      P ^= (unsigned long long)1 << i;
      X |= (unsigned long long)1 << i;
    }
  }
  return maxcl;
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  int n, k;
  cin >> n >> k;
  vector<unsigned long long> e(n);
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      int aij;
      cin >> aij;
      if (aij) {
        e[i] |= (unsigned long long)1 << j;
      }
    }
  }
  unsigned long long R = 0, X = 0, P = ((unsigned long long)1 << n) - 1;
  int size = clique(R, P, X, e);
  long double ans = (long double)0.5 * k * k * (size - 1) / size;
  cout << setprecision(7) << fixed << ans;
}
