#include <bits/stdc++.h>
using namespace std;
int N, k;
pair<pair<long long, long long>, int> xs[100005], ys[100005];
bool act[100005];
pair<long long, long long> point[100005];
long long f(int lox, int hix, int loy, int hiy, int k) {
  while (!act[xs[lox].second]) lox++;
  while (!act[xs[hix].second]) hix--;
  while (!act[ys[loy].second]) loy++;
  while (!act[ys[hiy].second]) hiy--;
  if (k == 0) {
    int loxi, hixi, loyi, hiyi;
    loxi = xs[lox].second;
    hixi = xs[hix].second;
    loyi = ys[loy].second;
    hiyi = ys[hiy].second;
    return (max(1LL, ((point[hixi].first - point[loxi].first + 1) / 2)) *
            max(1LL, ((point[hiyi].second - point[loyi].second + 1) / 2)));
  } else {
    long long a;
    if (act[xs[lox].second]) {
      act[xs[lox].second] = false;
      a = f(lox + 1, hix, loy, hiy, k - 1);
      act[xs[lox].second] = true;
    } else {
      a = f(lox + 1, hix, loy, hiy, k);
    }
    if (act[xs[hix].second]) {
      act[xs[hix].second] = false;
      a = min(a, f(lox, hix - 1, loy, hiy, k - 1));
      act[xs[hix].second] = true;
    } else {
      a = min(a, f(lox, hix - 1, loy, hiy, k));
    }
    if (act[ys[loy].second]) {
      act[ys[loy].second] = false;
      a = min(a, f(lox, hix, loy + 1, hiy, k - 1));
      act[ys[loy].second] = true;
    } else {
      a = min(a, f(lox, hix, loy + 1, hiy, k));
    }
    if (act[ys[hiy].second]) {
      act[ys[hiy].second] = false;
      a = min(a, f(lox, hix, loy, hiy - 1, k - 1));
      act[ys[hiy].second] = true;
    } else {
      a = min(a, f(lox, hix, loy, hiy - 1, k));
    }
    return a;
  }
}
int main() {
  scanf("%d", &N);
  scanf("%d", &k);
  for (int i = 0, x1, x2, y1, y2; i < N; i++) {
    scanf("%d %d %d %d", &x1, &y1, &x2, &y2);
    xs[i] = {{x1 + x2, y1 + y2}, i};
    ys[i] = {{y1 + y2, x1 + x2}, i};
    point[i] = {x1 + x2, y1 + y2};
  }
  sort(xs, xs + N);
  sort(ys, ys + N);
  memset(act, true, sizeof(act));
  printf("%I64d\n", f(0, N - 1, 0, N - 1, k));
}
