#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int inf = 1e9 + 9;
const long long MOD = 1e9 + 696969;
const long long INF = 1e18;
pair<double, double> punkty[100100];
double x1, x2, help, y2;
int n, k;
pair<double, int> srtx[100100];
pair<double, int> srty[100100];
bool jest[100100];
multiset<double> X, Y;
long long Fmax(long double wart) {
  long long ret = wart;
  if (ret < wart) return ++ret;
  return max(1LL, ret);
}
int main() {
  scanf("%d%d", &n, &k) ?: 0;
  fill(jest + 1, jest + n + 1, false);
  if (k == n - 1) {
    cout << "1";
    exit(0);
  };
  long long all = INF;
  for (int i = 1; i <= n; ++i) {
    scanf("%lf%lf%lf%lf", &x1, &help, &x2, &y2) ?: 0;
    punkty[i].first = (x2 + x1) * 0.5;
    punkty[i].second = (help + y2) * 0.5;
    srtx[i].first = punkty[i].first;
    srtx[i].second = srty[i].second = i;
    srty[i].first = punkty[i].second;
    X.insert(punkty[i].first);
    Y.insert(punkty[i].second);
  }
  sort(srtx + 1, srtx + n + 1);
  sort(srty + 1, srty + n + 1);
  for (int a = 0; a <= 10; ++a)
    for (int b = 0; b <= 10; ++b)
      for (int c = 0; c <= 10; ++c)
        for (int d = 0; d <= 10; ++d) {
          if (a + b + c + d > k) continue;
          vector<int> wyk;
          wyk.clear();
          for (int i = 1; i <= a; ++i) {
            int elem = srtx[i].second;
            if (!jest[elem]) {
              jest[elem] = 1;
              wyk.push_back(elem);
              X.erase(X.find(punkty[elem].first));
              Y.erase(Y.find(punkty[elem].second));
            }
          }
          for (int i = 1; i <= b; ++i) {
            int elem = srtx[n - i + 1].second;
            if (!jest[elem]) {
              jest[elem] = 1;
              wyk.push_back(elem);
              X.erase(X.find(punkty[elem].first));
              Y.erase(Y.find(punkty[elem].second));
            }
          }
          for (int i = 1; i <= c; ++i) {
            int elem = srty[i].second;
            if (!jest[elem]) {
              jest[elem] = 1;
              wyk.push_back(elem);
              X.erase(X.find(punkty[elem].first));
              Y.erase(Y.find(punkty[elem].second));
            }
          }
          for (int i = 1; i <= d; ++i) {
            int elem = srty[n - i + 1].second;
            if (!jest[elem]) {
              jest[elem] = 1;
              wyk.push_back(elem);
              X.erase(X.find(punkty[elem].first));
              Y.erase(Y.find(punkty[elem].second));
            }
          }
          multiset<double>::iterator it = X.end();
          it--;
          long double MAXX = *it;
          it = X.begin();
          long double MINX = *it;
          it = Y.end();
          --it;
          long double MAXY = *it;
          it = Y.begin();
          long double MINY = *it;
          long long result = Fmax(MAXX - MINX) * (Fmax(MAXY - MINY));
          all = min(all, result);
          for (unsigned int i = 0; i < wyk.size(); ++i) {
            jest[wyk[i]] = false;
            X.insert(punkty[wyk[i]].first);
            Y.insert(punkty[wyk[i]].second);
          }
        }
  cout << all;
}
