#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int n, m, i, j, x, kx, y, ky;
long long ans;
bool vis[N];
struct arr {
  int x, id;
} a[N], b[N];
bool operator<(arr A, arr B) { return A.x < B.x; }
int read() {
  char c = getchar();
  int k = 0;
  for (; c < 48 || c > 57; c = getchar())
    ;
  for (; c > 47 && c < 58; c = getchar()) k = (k << 3) + (k << 1) + c - 48;
  return k;
}
int main() {
  for (n = read(), m = read(), i = 1; i <= n; i++) {
    int xa = read(), ya = read(), xb = read(), yb = read();
    a[i] = (arr){xa + xb, i}, b[i] = (arr){ya + yb, i};
  }
  sort(a + 1, a + n + 1);
  sort(b + 1, b + n + 1);
  ans = 1e18;
  for (i = 0; i <= m; i++, vis[a[i].id] = 1) {
    for (j = 0; i + j <= m; j++, vis[a[j].id] = 1)
      for (x = 0, kx = 0; i + j + kx <= m; x++, kx += !vis[b[x].id])
        for (y = n + 1, ky = 0; i + j + kx + ky <= m; y--, ky += !vis[b[y].id])
          ans = min(ans, (long long)max(1, (a[n - j].x - a[1 + i].x + 1) >> 1) *
                             max(1, (b[y - 1].x - b[x + 1].x + 1) >> 1));
    for (j = 0; i + j <= m; j++, vis[a[j].id] = 0)
      ;
  }
  cout << ans;
}
