#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1000 * 1000;
const long long INF = (long long)4000 * 1000 * 1000 * 1000 * 1000 * 1000;
pair<long long, long long> crd[MAXN];
long long allx[2 * MAXN], ally[2 * MAXN];
int len;
vector<long long> t[MAXN];
int n;
long long find(int tl, int tr, int v, int l, int r, long long cur_l,
               long long cur_r) {
  if (tl > tr) return 0;
  if (tl == l && tr == r) {
    return (long long)distance(lower_bound(t[v].begin(), t[v].end(), cur_l),
                               upper_bound(t[v].begin(), t[v].end(), cur_r));
  }
  int s = (l + r) / 2;
  return find(tl, min(s, tr), 2 * v, l, s, cur_l, cur_r) +
         find(max(s + 1, tl), tr, 2 * v + 1, s + 1, r, cur_l, cur_r);
}
long long find_cnt(long long lx, long long rx, long long ly, long long ry) {
  int l = distance(allx, lower_bound(allx, allx + n, lx)),
      r = distance(allx, upper_bound(allx, allx + n, rx)) - 1;
  return find(l + len, r + len, 1, len, len * 2 - 1, ly, ry);
}
int main() {
  int k;
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    long long lx, ly, rx, ry;
    assert(~scanf("%I64d %I64d %I64d %I64d", &lx, &ly, &rx, &ry));
    lx *= 2;
    ly *= 2;
    rx *= 2;
    ry *= 2;
    allx[i] = (lx + rx) / 2;
    ally[i] = (ly + ry) / 2;
    crd[i] = {(lx + rx) / 2, (ly + ry) / 2};
  }
  sort(allx, allx + n);
  sort(ally, ally + n);
  sort(crd, crd + n);
  for (len = 1; len < n; len *= 2)
    ;
  for (int i = 0; i < n; i++) {
    t[i + len].push_back(crd[i].second);
  }
  for (int i = len - 1; i > 0; i--) {
    t[i].resize(((int)(t[2 * i].size())) + ((int)(t[2 * i + 1].size())));
    merge(t[2 * i].begin(), t[2 * i].end(), t[2 * i + 1].begin(),
          t[2 * i + 1].end(), t[i].begin());
  }
  long long ans = INF;
  for (int ind_lx = 0; ind_lx < min(n, 11); ind_lx++)
    for (int ind_rx = 0; ind_rx < min(n, 11); ind_rx++)
      for (int ind_ly = 0; ind_ly < min(n, 11); ind_ly++)
        for (int ind_ry = 0; ind_ry < min(n, 11); ind_ry++) {
          long long lx = allx[ind_lx], rx = allx[n - 1 - ind_rx];
          long long ly = ally[ind_ly], ry = ally[n - 1 - ind_ry];
          if (lx <= rx && ly <= ry && (rx - lx) % 2 == 0 &&
              (ry - ly) % 2 == 0 && find_cnt(lx, rx, ly, ry) >= n - k) {
            if (lx != rx && ly != ry) ans = min(ans, (rx - lx) * (ry - ly));
            if (lx == rx) {
              ans = min(ans, 2 * (ry - ly));
            }
            if (ly == ry) {
              ans = min(ans, 2 * (rx - lx));
            }
          }
        }
  cout << max(ans / 4, (long long)1) << endl;
  return 0;
}
