#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
struct xxx {
  double k;
  int p;
} x[N], y[N], xx[N], yy[N];
bool com(xxx a, xxx b) { return a.k < b.k; }
set<int> s;
long long ans;
int n, K;
int main() {
  scanf("%d%d", &n, &K);
  for (int i = 1; i <= n; i++) {
    int a, b, c, d;
    scanf("%d%d%d%d", &a, &b, &c, &d);
    x[i].p = y[i].p = i;
    ;
    x[i].k = 1.0 * (a + c) / 2;
    y[i].k = 1.0 * (b + d) / 2;
  }
  ans = 1e18 + 1;
  sort(x + 1, x + n + 1, com);
  sort(y + 1, y + n + 1, com);
  for (int i = 0; i <= K; i++)
    for (int j = 0; j <= K; j++)
      for (int k = 0; k <= K; k++)
        for (int l = 0; l <= K; l++) {
          int X = 0;
          double tx, ty, cx, cy;
          tx = ty = cx = cy = -1;
          s.clear();
          for (int u = 1; u <= i; u++) s.insert(x[u].p);
          for (int u = n; u > n - j; u--) s.insert(x[u].p);
          for (int u = 1; u <= k; u++) s.insert(y[u].p);
          for (int u = n; u > n - l; u--) s.insert(y[u].p);
          if (s.size() <= K) {
            tx = x[i + 1].k;
            cx = x[n - j].k;
            ty = y[k + 1].k;
            cy = y[n - l].k;
            long long xx = (long long)(cx - tx + 0.5);
            long long yy = (long long)(cy - ty + 0.5);
            if (xx == 0) xx++;
            if (yy == 0) yy++;
            ans = min(ans, (long long)(xx * yy));
          }
        }
  printf("%I64d", ans);
  return 0;
}
