#include <bits/stdc++.h>
using namespace std;
struct __io_dev {
  __io_dev(const bool& __fastio = false) {
    if (__fastio) ios_base::sync_with_stdio(false), cin.tie(nullptr);
    srand(time(nullptr));
    if (!string("").empty())
      freopen(
          ""
          ".in",
          "r", stdin),
          freopen(
              ""
              ".out",
              "w", stdout);
  }
  ~__io_dev() { fprintf(stderr, "%.6f ms\n", 1e3 * clock() / CLOCKS_PER_SEC); }
} __io(false);
const long long inf = (long long)1e+9 + 7ll;
const long long linf = (long long)1e+18 + 7ll;
const long double eps = (long double)1e-9;
const long double pi = acosl((long double)-1.0);
const int alph = 26;
const int sqr = 3017;
static char buff[(int)2e6 + 17];
long long __p[3] = {29ll, 31ll, 33ll};
long long __mod[3] = {inf, inf + 2ll, 14881337ll};
const int maxn = (int)2e5 + 17;
struct rect {
  int a, b, c, d;
  rect() {}
};
int n, k;
rect r[maxn];
vector<pair<double, int> > x, y;
long long solve(int lf, int rg, int up, int bo) {
  set<int> bad;
  double l = 0, r = inf, u = inf, b = 0;
  for (int i = 0; i < n; ++i, --lf)
    if (!bad.count(x[i].second)) {
      l = max(l, x[i].first);
      if (lf > 0)
        bad.insert(x[i].second);
      else
        break;
    } else
      ++lf;
  for (int i = n - 1; i >= 0; --i, --rg)
    if (!bad.count(x[i].second)) {
      r = min(r, x[i].first);
      if (rg > 0)
        bad.insert(x[i].second);
      else
        break;
    } else
      ++rg;
  for (int i = 0; i < n; ++i, --bo)
    if (!bad.count(y[i].second)) {
      b = max(b, y[i].first);
      if (bo > 0)
        bad.insert(y[i].second);
      else
        break;
    } else
      ++bo;
  for (int i = n - 1; i >= 0; --i, --up)
    if (!bad.count(y[i].second)) {
      u = min(u, y[i].first);
      if (up > 0)
        bad.insert(y[i].second);
      else
        break;
    } else
      ++up;
  long long A = max(1ll, (long long)ceil(r - l));
  long long B = max(1ll, (long long)ceil(u - b));
  return max(1ll, 1ll * A * B);
}
int main() {
  scanf("%d %d", &n, &k);
  for (long long i = 0ll; i < (long long)n; ++i) {
    scanf("%d %d %d %d", &r[i].a, &r[i].b, &r[i].c, &r[i].d);
    x.push_back({(r[i].a + r[i].c) / 2.0, i});
    y.push_back({(r[i].b + r[i].d) / 2.0, i});
  }
  sort(x.begin(), x.end());
  sort(y.begin(), y.end());
  long long ans = linf;
  for (int l = 0; l <= k; ++l)
    for (int r = 0; l + r <= k; ++r)
      for (int up = 0; l + r + up <= k; ++up) {
        int bo = k - l - r - up;
        ans = min(ans, solve(l, r, up, bo));
      }
  printf("%lld\n", ans);
  return 0;
}
