#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  list<pair<double, double>> magnets;
  list<list<pair<double, double>>::iterator> lowest, highest, left, right;
  while (n--) {
    int llx, lly, urx, ury;
    scanf("%d %d %d %d", &llx, &lly, &urx, &ury);
    magnets.push_back(
        make_pair((double)(urx + llx) / 2.0, (double)(ury + lly) / 2.0));
    list<pair<double, double>>::iterator it = prev(magnets.end());
    list<list<pair<double, double>>::iterator>::iterator insertor =
        lowest.begin();
    while (insertor != lowest.end() && (*(*insertor)).second < (*it).second)
      insertor++;
    lowest.insert(insertor, it);
    if (lowest.size() > k + 1) lowest.pop_back();
    insertor = highest.begin();
    while (insertor != highest.end() && (*(*insertor)).second > (*it).second)
      insertor++;
    highest.insert(insertor, it);
    if (highest.size() > k + 1) highest.pop_back();
    insertor = right.begin();
    while (insertor != right.end() && (*(*insertor)).first > (*it).first)
      insertor++;
    right.insert(insertor, it);
    if (right.size() > (2 * k) + 1) right.pop_back();
    insertor = left.begin();
    while (insertor != left.end() && (*(*insertor)).first < (*it).first)
      insertor++;
    left.insert(insertor, it);
    if (left.size() > (2 * k) + 1) left.pop_back();
  }
  unsigned long long int ans = ULLONG_MAX;
  list<list<pair<double, double>>::iterator> eliminated;
  list<list<pair<double, double>>::iterator> tempeliminated;
  list<list<pair<double, double>>::iterator>::iterator itl = lowest.begin();
  for (int i = 0; i <= k; i++) {
    list<list<pair<double, double>>::iterator>::iterator ith = highest.begin();
    tempeliminated.clear();
    for (int j = 0; i + j <= k; j++) {
      unsigned long long int height =
          round(ceil((*(*ith)).second - (*(*itl)).second));
      if (height == 0) height += 1;
      list<list<pair<double, double>>::iterator>::iterator itle = left.begin();
      for (int l = 0; i + j + l <= k; l++) {
        for (auto el : eliminated)
          if (*itle == el) itle++;
        for (auto el : tempeliminated)
          if (*itle == el) itle++;
        list<list<pair<double, double>>::iterator>::iterator itri =
            right.begin();
        for (int m = 0; i + j + l + m <= k; m++) {
          for (auto el : eliminated)
            if (*itri == el) itri++;
          for (auto el : tempeliminated)
            if (*itri == el) itri++;
          unsigned long long int width =
              rint(ceil((*(*itri)).first - (*(*itle)).first));
          if (width == 0) width += 1;
          if (width * height < ans) ans = width * height;
          if (*itri == *itl || *itri == *ith) break;
          itri++;
        }
        if (*itle == *itl || *itle == *ith) break;
        itle++;
      }
      tempeliminated.push_back(*ith);
      ith++;
    }
    eliminated.push_back(*itl);
    itl++;
  }
  cout << std::setprecision(20) << ans;
  return 0;
}
