#include <bits/stdc++.h>
using namespace std;
void SR(int &x) { scanf("%d", &x); }
void SR(long long &x) { scanf("%lld", &x); }
void SR(double &x) { scanf("%lf", &x); }
void SR(char *s) { scanf("%s", s); }
void RI() {}
template <typename I, typename... T>
void RI(I &x, T &...tail) {
  SR(x);
  RI(tail...);
}
void SP(const int x) { printf("%d", x); }
void SP(const long long x) { printf("%lld", x); }
void SP(const double x) { printf("%.16lf", x); }
void SP(const char *s) { printf(s); }
void PS() { puts(""); }
template <typename I, typename... T>
void PS(I &x, T &...tail) {
  putchar(' ');
  SP(x);
  PS(tail...);
}
void PL() { puts(""); }
template <typename I, typename... T>
void PL(const I x, const T... tail) {
  SP(x);
  PS(tail...);
}
const int maxn = 1e5 + 5;
int n, k;
long long x[2][maxn], y[2][maxn];
void read() {
  RI(n, k);
  for (int i = 0; i < int(n); i++)
    for (int j = 0; j < int(2); j++) RI(x[j][i], y[j][i]);
}
bool cmp(int i, int j) { return x[0][i] + x[1][i] < x[0][j] + x[1][j]; }
long long ox[maxn], oy[maxn];
bool cmp2(int i, int j) { return oy[i] < oy[j]; }
vector<int> odr;
void build() {
  for (int i = 0; i < int(n); i++) odr.push_back(i);
  sort(begin(odr), end(odr), cmp);
  for (int i = 0; i < int(n); i++)
    for (int j = 0; j < int(2); j++) {
      ox[i] += x[j][odr[i]];
      oy[i] += y[j][odr[i]];
    }
  sort(begin(odr), end(odr), cmp2);
}
inline int count(int f) { return __builtin_popcount(f); }
bitset<maxn> del;
void sol() {
  long long ans = 4e18;
  int id[25], up[25], lo[25];
  for (int l = 0; l < int(1 << k); l++)
    for (int r = 0; r < int(1 << k); r++)
      if (count(l) + count(r) <= k) {
        int t = 0, lft = -1, rgt = n;
        for (int i = 0; i < int(k); i++)
          if (l & (1 << i)) id[t++] = lft = i;
        for (int i = 0; i < int(k); i++)
          if (r & (1 << i)) id[t++] = rgt = n - i - 1;
        if (lft >= rgt) continue;
        sort(id, id + t);
        assert(unique(id, id + t) - id == t);
        for (int i = 0; i < int(t); i++) del[id[i]] = 1;
        int xl = ox[t], xr = ox[n - 1 - t];
        for (int i = 0; i < int(t); i++)
          if (id[i] != i) {
            xl = ox[i];
            break;
          }
        for (int i = 0; i < int(t); i++)
          if (id[t - 1 - i] != n - 1 - i) {
            xr = ox[n - 1 - i];
            break;
          }
        int siz = k - t + 1, us = 0, ls = k - t;
        for (auto i : odr)
          if (!del[i]) {
            up[us++] = i;
            if (us == siz) break;
          }
        for (int i = n - 1; i >= 0; i--) {
          int f = odr[i];
          if (del[f]) continue;
          lo[ls--] = f;
          if (ls < 0) break;
        }
        int dy = 2e9;
        for (int i = (0); i <= int(k - t); i++)
          dy = min(1LL * dy, oy[lo[i]] - oy[up[i]]);
        dy = max(1, (dy + 1) / 2);
        xr = max(1, (xr - xl + 1) / 2);
        long long c = 1LL * dy * xr;
        ans = min(ans, c);
        for (int i = 0; i < int(t); i++) del[id[i]] = 0;
      }
  PL(max(ans, 1LL));
}
int main() {
  read();
  build();
  sol();
  return 0;
}
