#include <bits/stdc++.h>
using namespace std;
long long ans;
int X1[200010], Y1[200010], X2[200010], Y2[200010];
int x[200010], y[200010];
int cntx[200010], cnty[200010];
int ax[200010], ay[200010], cx, cy, N, a[200010];
void calc(int sx, int ex, int val) {
  int t, res, sy, ey;
  for (int i = 0; i < cy; i++) a[i] = cnty[i];
  for (int i = 0; i < N; i++) {
    if (x[i] < sx || x[i] > ex) {
      t = lower_bound(ay, ay + cy, y[i]) - ay;
      a[t]--;
    }
  }
  res = 0;
  for (int i = 0; i < cy; i++) {
    if (res > val) break;
    t = 0;
    for (int j = cy - 1; j >= i; j--) {
      if (res + t > val) break;
      sy = ay[i];
      ey = ay[j];
      if ((ey - sy) & 1) ey++;
      if (ey == sy) ey = sy + 2;
      ans = min(ans, (long long)(ey - sy) * (ex - sx));
      t += a[j];
    }
    res += a[i];
  }
  return;
}
int main() {
  int K, t, res, val, sx, ex;
  scanf("%d%d", &N, &K);
  for (int i = 0; i < N; i++) scanf("%d%d%d%d", X1 + i, Y1 + i, X2 + i, Y2 + i);
  for (int i = 0; i < N; i++) x[i] = X1[i] + X2[i];
  for (int i = 0; i < N; i++) y[i] = Y1[i] + Y2[i];
  for (int i = 0; i < N; i++) ax[i] = x[i];
  sort(ax, ax + N);
  cx = unique(ax, ax + N) - ax;
  for (int i = 0; i < N; i++) ay[i] = y[i];
  sort(ay, ay + N);
  cy = unique(ay, ay + N) - ay;
  for (int i = 0; i < N; i++) {
    t = lower_bound(ax, ax + cx, x[i]) - ax;
    cntx[t]++;
  }
  for (int i = 0; i < N; i++) {
    t = lower_bound(ay, ay + cy, y[i]) - ay;
    cnty[t]++;
  }
  ans = 6000000000000000000LL;
  res = 0;
  for (int i = 0; i < cx; i++) {
    if (res > K) break;
    t = 0;
    for (int j = cx - 1; j >= i; j--) {
      if (t + res > K) break;
      val = K - t - res;
      sx = ax[i];
      ex = ax[j];
      if ((ex - sx) & 1) ex++;
      if (ex == sx) ex += 2;
      calc(sx, ex, val);
      t += cntx[j];
    }
    res += cntx[i];
  }
  printf("%I64d\n", ans / 4);
  return 0;
}
