#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
int n, k;
long long x[N], y[N];
int pos1[N], pos2[N], pos3[N], pos4[N];
int st[N];
bool cmp1(int a, int b) { return x[a] < x[b]; }
bool cmp2(int a, int b) { return x[a] > x[b]; }
bool cmp3(int a, int b) { return y[a] < y[b]; }
bool cmp4(int a, int b) { return y[a] > y[b]; }
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 0; i < n; i++) {
    long long x1, x2, y1, y2;
    scanf("%lld%lld%lld%lld", &x1, &y1, &x2, &y2);
    x[i] = x1 + x2;
    y[i] = y1 + y2;
    pos1[i] = pos2[i] = pos3[i] = pos4[i] = i;
  }
  sort(pos1, pos1 + n, cmp1);
  sort(pos2, pos2 + n, cmp2);
  sort(pos3, pos3 + n, cmp3);
  sort(pos4, pos4 + n, cmp4);
  int dqx = 0;
  long long ans = 1LL << 62;
  for (int a = 0; a <= k; a++) {
    for (int b = 0; b <= k; b++) {
      for (int c = 0; c <= k; c++) {
        for (int d = 0; d <= k; d++) {
          dqx++;
          int cnt = 0;
          for (int i = 0; i < a; i++)
            if (st[pos1[i]] != dqx) st[pos1[i]] = dqx, cnt++;
          for (int i = 0; i < b; i++)
            if (st[pos2[i]] != dqx) st[pos2[i]] = dqx, cnt++;
          for (int i = 0; i < c; i++)
            if (st[pos3[i]] != dqx) st[pos3[i]] = dqx, cnt++;
          for (int i = 0; i < d; i++)
            if (st[pos4[i]] != dqx) st[pos4[i]] = dqx, cnt++;
          if (cnt != k) continue;
          long long xma = -(1LL << 62), xmi = 1LL << 62, yma = -(1LL << 62),
                    ymi = 1LL << 62;
          for (int i = 0; i < n; i++) {
            if (st[i] != dqx) {
              xma = max(xma, x[i]);
              xmi = min(xmi, x[i]);
              yma = max(yma, y[i]);
              ymi = min(ymi, y[i]);
            }
          }
          long long X = xma - xmi, Y = yma - ymi;
          X = max(X, 2LL);
          Y = max(Y, 2LL);
          ans = min(ans, X * Y);
        }
      }
    }
  }
  printf("%lld\n", ans / 4);
}
