#include <bits/stdc++.h>
using namespace std;
long long mod = 1000000007;
int main() {
  int n, m, k;
  string s;
  long long ans = 0;
  scanf("%d %d", &n, &k);
  std::vector<std::pair<int, int> > l, r, t, b;
  for (int i = 0; i < n; i++) {
    int x1, x2, y1, y2;
    scanf("%d %d %d %d", &x1, &y1, &x2, &y2);
    l.push_back(make_pair(x1 + x2, i));
    b.push_back(make_pair(y1 + y2, i));
    r.push_back(make_pair(x1 + x2, i));
    t.push_back(make_pair(y2 + y1, i));
  }
  sort((l).begin(), (l).end());
  sort((b).begin(), (b).end());
  sort((t).begin(), (t).end());
  sort((r).begin(), (r).end());
  reverse((r).begin(), (r).end());
  reverse((t).begin(), (t).end());
  long long bestS = 1999999999999999999;
  std::vector<bool> del(n, false);
  for (int dl = 0; dl <= k; dl++) {
    for (int dr = 0; dr <= k - dl; dr++) {
      for (int dt = 0; dt <= k - dl - dr; dt++) {
        int db = k - dl - dr - dt;
        std::vector<int> cdel;
        for (int i = 0; i < dl; i++) {
          int v = l[i].second;
          cdel.push_back(v);
          del[v] = true;
        }
        auto pt = t.begin();
        for (int i = 0; i < dt; i++) {
          while (del[pt->second]) pt++;
          cdel.push_back(pt->second);
          del[pt->second] = true;
        }
        pt = r.begin();
        for (int i = 0; i < dr; i++) {
          while (del[pt->second]) pt++;
          cdel.push_back(pt->second);
          del[pt->second] = true;
        }
        pt = b.begin();
        for (int i = 0; i < db; i++) {
          while (del[pt->second]) pt++;
          cdel.push_back(pt->second);
          del[pt->second] = true;
        }
        pt = t.begin() + dt;
        auto push_back = b.begin() + db;
        auto pr = r.begin() + dr;
        auto pl = l.begin() + dl;
        while (del[pt->second]) pt++;
        while (del[push_back->second]) push_back++;
        while (del[pr->second]) pr++;
        while (del[pl->second]) pl++;
        long long w = (pr->first - pl->first + 1) / 2;
        long long h = (pt->first - push_back->first + 1) / 2;
        if (w == 0) w = 1;
        if (h == 0) h = 1;
        bestS = min(bestS, w * h);
        for (auto xxx : cdel) del[xxx] = false;
      }
    }
  }
  cout << bestS;
}
