#include <bits/stdc++.h>
using namespace std;
const int N = 100100;
int n, k;
struct point {
  double x, y;
  int id;
} a[N], b[N], c[N], d[N];
bool c1(point x, point y) { return x.x < y.x; }
bool c2(point x, point y) { return x.x > y.x; }
bool c3(point x, point y) { return x.y < y.y; }
bool c4(point x, point y) { return x.y > y.y; }
set<int> S;
int main() {
  scanf("%d %d", &n, &k);
  for (int i = 1; i <= n; i++) {
    int x1, x2, y1, y2;
    scanf("%d %d %d %d", &x1, &y1, &x2, &y2);
    a[i].x = 1.0 * (x1 + x2) / 2;
    a[i].y = 1.0 * (y1 + y2) / 2;
    a[i].id = i;
    b[i] = c[i] = d[i] = a[i];
  }
  sort(a + 1, a + n + 1, c1);
  sort(b + 1, b + n + 1, c2);
  sort(c + 1, c + n + 1, c3);
  sort(d + 1, d + n + 1, c4);
  long long ans = (long long)9e18;
  for (int i = 0; i <= k; i++) {
    for (int j = 0; j <= k; j++) {
      for (int l = 0; l <= k; l++) {
        for (int p = 0; p <= k; p++) {
          double Lr = a[i + 1].x, Rr = b[j + 1].x;
          double Lc = c[l + 1].y, Rc = d[p + 1].y;
          if (Lr > Rr || Lc > Rc) continue;
          S.clear();
          for (int o = 1; o <= i; o++) S.insert(a[o].id);
          for (int o = 1; o <= j; o++) S.insert(b[o].id);
          for (int o = 1; o <= l; o++) S.insert(c[o].id);
          for (int o = 1; o <= p; o++) S.insert(d[o].id);
          long long x = (long long)(Rr - Lr + 0.5),
                    y = (long long)(Rc - Lc + 0.5);
          x = max(x, 1ll), y = max(y, 1ll);
          if ((int)S.size() <= k) ans = min(ans, x * y);
        }
      }
    }
  }
  printf("%I64d\n", ans);
  return 0;
}
