#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9, maxn = 2e5 + 5;
int n, tot;
struct po {
  int x, y;
} a[maxn], b[maxn];
int cmp(po a, po b) { return a.x < b.x; }
int cmp1(po a, po b) { return a.y < b.y; }
signed main() {
  scanf("%d%d", &n, &tot);
  for (int i = 1; i <= n; i++) {
    int x1, y1, x2, y2;
    scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
    a[i].x = (x1 + x2);
    a[i].y = (y1 + y2);
  }
  sort(a + 1, a + n + 1, cmp);
  long long ans = 1e18;
  for (int i = 0; i <= tot; i++)
    for (int j = 0; i + j <= tot; j++) {
      int cnt = 0;
      for (int k = i + 1; k <= n - j; k++) {
        b[++cnt] = a[k];
      }
      sort(b + 1, b + cnt + 1, cmp1);
      int k = tot - (i + j);
      for (int cur = 0; cur <= k; cur++) {
        int x1 = 2e9, x2 = 0;
        int y1 = 2e9, y2 = 0;
        for (int v = cur + 1; v <= cnt - (k - cur); v++) {
          x2 = max(x2, b[v].x);
          x1 = min(x1, b[v].x);
          y2 = max(y2, b[v].y);
          y1 = min(y1, b[v].y);
        }
        int dx = x2 - x1, dy = y2 - y1;
        if (dx == 0) ++dx;
        if (dy == 0) ++dy;
        dx = (dx + 1) / 2;
        dy = (dy + 1) / 2;
        ans = min(ans, 1ll * dx * dy);
      }
    }
  printf("%lld\n", ans);
  return 0;
}
