#include <bits/stdc++.h>   using namespace std;   const int N = 40;   const int F = N / 2 + N % 2;   const int S = N - F;   const long long N_MASKS = (1ll << N);   const long long F_MASKS = (1ll << F);   const long long S_MASKS = (1ll << S);   double liquid;   int n, f, s;   long long adj[N];   int firstSizes[F_MASKS];   long long firstAvailables[F_MASKS];   int secondSizes[S_MASKS];   long long secondAvailables[S_MASKS];   int maxPossible[S_MASKS];   void readData() {     cin >> n >> liquid;     f = n / 2 + n % 2;     s = n - f;     for (int i = 0; i < n; ++i) {       for (int j = 0; j < n; ++j) {         long long a;         cin >> a;         adj[i] |= (a << j);       }     }   }   void findCliques(int sta, int cur, int fin, long long mask, int size,                    long long available, int* sizes, long long* availables) {     if (cur == fin) {       return;     }     findCliques(sta, cur + 1, fin, mask, size, available, sizes, availables);     if ((1ll << cur) & available) {       mask |= (1ll << cur);       ++size;       available &= adj[cur];       sizes[mask >> sta] = size;       availables[mask >> sta] = available;       findCliques(sta, cur + 1, fin, mask, size, available, sizes, availables);     }   }   int findPossibles(long long available) {     if (maxPossible[available]) {       return maxPossible[available];     }     if (available == 0) {       return 0;     }     if (secondSizes[available]) {       return maxPossible[available] = secondSizes[available];     }     for (int i = 0; i < s; ++i) {       if (available & (1ll << i)) {         maxPossible[available] =             max(maxPossible[available], findPossibles(available & ~(1ll << i)));       }     }     return maxPossible[available];   }   int findMaxClique() {     findCliques(0, 0, f, 0, 0, (1ll << n) - 1, firstSizes, firstAvailables);     findCliques(f, f, n, 0, 0, (1ll << n) - 1, secondSizes, secondAvailables);     int res = findPossibles((1 << s) - 1);     for (int mask = 0; mask < (1 << f); ++mask) {       if (firstSizes[mask]) {         res = max(res,                   firstSizes[mask] + findPossibles(firstAvailables[mask] >> f));       }     }     return res;   }   double solve() {     int x = findMaxClique();     return 0.5 * liquid * liquid * (x - 1.) / x;   }   int main() {     ios_base::sync_with_stdio(false);     cout << setprecision(20) << fixed;     readData();     cout << solve();     return 0;   }   