#include <bits/stdc++.h>
using namespace std;
void desperate_optimization(int precision) {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout.setf(ios::fixed);
  cout.setf(ios::showpoint);
  cout.precision(precision);
}
struct point {
  long long x, y;
  int idx;
};
vector<point> vec;
bool cmpx(point &A, point &B) { return A.x < B.x; }
bool cmpy(point &A, point &B) { return A.y < B.y; }
deque<point> xx, yy;
const int N = 1e5;
int mark[N + 5];
long long res = 0;
vector<int> dist;
int ctr = 0;
void rec(int sisa, int id) {
  if (id == 3) {
    dist.push_back(sisa);
    deque<point> x = xx, y = yy;
    ctr++;
    for (int i = 0; i < 4; i++) {
      for (int j = 0; j < dist[i]; j++) {
        if (i == 0) {
          while (mark[x.front().idx] == ctr) x.pop_front();
          mark[x.front().idx] = ctr;
          x.pop_front();
        } else if (i == 1) {
          while (mark[x.back().idx] == ctr) x.pop_back();
          mark[x.back().idx] = ctr;
          x.pop_back();
        } else if (i == 2) {
          while (mark[y.front().idx] == ctr) y.pop_front();
          mark[y.front().idx] = ctr;
          y.pop_front();
        } else {
          while (mark[y.back().idx] == ctr) y.pop_back();
          mark[y.back().idx] = ctr;
          y.pop_back();
        }
      }
    }
    while (mark[x.front().idx] == ctr) x.pop_front();
    while (mark[x.back().idx] == ctr) x.pop_back();
    while (mark[y.front().idx] == ctr) y.pop_front();
    while (mark[y.back().idx] == ctr) y.pop_back();
    res = min(max(1LL, (x.back().x - x.front().x) / 2) *
                  max(1LL, (y.back().y - y.front().y) / 2),
              res);
    dist.pop_back();
    return;
  } else {
    for (int i = 0; i <= sisa; i++) {
      dist.push_back(i);
      rec(sisa - i, id + 1);
      dist.pop_back();
    }
  }
}
void hora(int tc) {
  int n, k;
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    int xx1, yy1, xx2, yy2;
    cin >> xx1 >> yy1 >> xx2 >> yy2;
    point tmp;
    tmp.x = (xx2 + xx1), tmp.y = (yy2 + yy1);
    tmp.idx = i;
    vec.push_back(tmp);
  }
  sort(vec.begin(), vec.end(), cmpx);
  for (int i = 0; i < n; i++) xx.push_back(vec[i]);
  sort(vec.begin(), vec.end(), cmpy);
  for (int i = 0; i < n; i++) yy.push_back(vec[i]);
  res = 1e18;
  rec(k, 0);
  cout << res << '\n';
}
int main() {
  desperate_optimization(10);
  int ntc = 1;
  for (int tc = 1; tc <= ntc; tc++) hora(tc);
  return 0;
}
