#include <bits/stdc++.h>
using namespace std;
pair<int, int> le[100100], ri[100100], top[100100], bottom[100100];
bool used[100100];
int n;
long long calc() {
  int i;
  for (i = 0; used[le[i].second]; i++)
    ;
  long long l = le[i].first;
  for (i = 0; used[ri[i].second]; i++)
    ;
  long long r = ri[i].first;
  for (i = 0; used[top[i].second]; i++)
    ;
  long long t = top[i].first;
  for (i = 0; used[bottom[i].second]; i++)
    ;
  long long b = bottom[i].first;
  long long w = max(1ll, (r - l + 1) / 2);
  long long h = max(1ll, (t - b + 1) / 2);
  return w * h;
}
long long go(int k);
void check(pair<int, int> *arr, long long &best, int k) {
  int i = 0, n = 0;
  int mas[11];
  int last;
  while (true) {
    if (!used[arr[i].second]) {
      if (!n)
        mas[n++] = arr[i].second, last = arr[i].first;
      else if (last == arr[i].first)
        mas[n++] = arr[i].second;
      else
        break;
      if (n > k) break;
      used[arr[i].second] = 1;
    }
    i++;
  }
  if (n <= k) {
    long long ret = go(k - n);
    best = min(best, ret);
  }
  while (n--) used[mas[n]] = 0;
}
long long go(int k) {
  long long best = calc();
  if (!k) return best;
  check(le, best, k);
  check(ri, best, k);
  check(top, best, k);
  check(bottom, best, k);
  return best;
}
void Solve() {
  int i, j, k, m;
  scanf("%d%d", &(n), &(k));
  for (i = 0; i < n; i++) {
    int x1, x2, y1, y2;
    scanf("%d%d%d%d", &(x1), &(y1), &(x2), &(y2));
    ri[i].first = le[i].first = x1 + x2;
    ri[i].second = le[i].second = i;
    top[i].first = bottom[i].first = y1 + y2;
    top[i].second = bottom[i].second = i;
  }
  sort(le, le + n);
  sort(ri, ri + n, greater<pair<int, int> >());
  sort(bottom, bottom + n);
  sort(top, top + n, greater<pair<int, int> >());
  printf("%I64d", go(k));
}
int main() {
  Solve();
  return 0;
}
