#include <bits/stdc++.h>
using namespace std;
const int maxn = 100006;
struct pi {
  int x;
  int y;
} pp[maxn], pp2[maxn];
int cmp(pi a, pi b) { return a.x < b.x; }
int cmp1(pi a, pi b) { return a.y < b.y; }
int main() {
  int i, j, n, m;
  cin >> n >> m;
  for (i = 1; i <= n; i++) {
    int x, y, x1, y1;
    scanf("%d%d%d%d", &x, &y, &x1, &y1);
    pp[i].x = (x + x1);
    pp[i].y = (y + y1);
  }
  sort(pp + 1, pp + 1 + n, cmp);
  long long s1 = (long long)1 << 61;
  for (i = 0; i <= m; i++) {
    for (j = 0; i + j <= m; j++) {
      int x2 = 0, x1 = 2000000000;
      int y2 = 0, y1 = 2000000000;
      int tot = 0;
      for (int f = 1 + i; f <= n - j; f++) {
        pp2[++tot] = pp[f];
      }
      sort(pp2 + 1, pp2 + tot + 1, cmp1);
      int k = m - (i + j);
      for (int u = 0; u <= k; u++) {
        x2 = 0, x1 = 2000000000;
        y2 = 0, y1 = 2000000000;
        for (int v = 1 + u; v <= tot - (k - u); v++) {
          x2 = max(x2, pp2[v].x);
          x1 = min(x1, pp2[v].x);
          y2 = max(y2, pp2[v].y);
          y1 = min(y1, pp2[v].y);
        }
        if (x2 == x1) x2 = x1 + 1;
        if (y2 == y1) y2 = y1 + 1;
        x2 = x2 - x1;
        if (x2 % 2 == 1)
          x2 = (x2 + 1) / 2;
        else
          x2 = x2 / 2;
        y2 = y2 - y1;
        if (y2 % 2 == 1)
          y2 = (y2 + 1) / 2;
        else
          y2 = y2 / 2;
        s1 = min(s1, (long long)x2 * y2);
      }
    }
  }
  cout << s1 << endl;
}
