#include <bits/stdc++.h>
using namespace std;
struct rect {
  int a, b, c, d;
  int in;
  rect(int w, int x, int y, int z, int i) {
    a = w;
    b = x;
    c = y;
    d = z;
    in = i;
  }
  rect() { a = b = c = d = in = -1; }
};
bool cmp1(const rect &a, const rect &b) { return a.a + a.c < b.a + b.c; }
bool cmp2(const rect &a, const rect &b) { return a.b + a.d < b.b + b.d; }
rect h[100005];
rect v[100005];
bool tk[100005];
long long sol(int l, int r, int t, int b, int k) {
  if (tk[h[l].in]) {
    return sol(l + 1, r, t, b, k);
  }
  if (tk[h[r].in]) {
    return sol(l, r - 1, t, b, k);
  }
  if (tk[v[t].in]) {
    return sol(l, r, t + 1, b, k);
  }
  if (tk[v[b].in]) {
    return sol(l, r, t, b - 1, k);
  }
  if (k == 0) {
    int right = h[r].a + h[r].c;
    int left = h[l].a + h[l].c;
    long long width = (right - left);
    width = max(1ll, (width + 1) / 2);
    int bottom = v[b].b + v[b].d;
    int top = v[t].b + v[t].d;
    long long height = (bottom - top);
    height = max(1ll, (height + 1) / 2);
    return width * height;
  }
  long long mn = 1000000000000000000ll;
  tk[h[l].in] = true;
  mn = min(mn, sol(l + 1, r, t, b, k - 1));
  tk[h[l].in] = false;
  tk[h[r].in] = true;
  mn = min(mn, sol(l, r - 1, t, b, k - 1));
  tk[h[r].in] = false;
  tk[v[t].in] = true;
  mn = min(mn, sol(l, r, t + 1, b, k - 1));
  tk[v[t].in] = false;
  tk[v[b].in] = true;
  mn = min(mn, sol(l, r, t, b - 1, k - 1));
  tk[v[b].in] = false;
  return mn;
}
int main() {
  int n, k;
  scanf("%d %d", &n, &k);
  memset(tk, 0, sizeof(tk));
  for (int i = 0; i < n; i++) {
    int a, b, c, d;
    scanf("%d %d %d %d", &a, &b, &c, &d);
    h[i] = rect(a, b, c, d, i);
    v[i] = rect(a, b, c, d, i);
  }
  sort(h, h + n, cmp1);
  sort(v, v + n, cmp2);
  if (k == n) {
    printf("1\n");
    return 0;
  }
  printf("%I64d\n", sol(0, n - 1, 0, n - 1, k));
}
