#include <bits/stdc++.h>
using namespace std;
int n, K;
long long ans = -1;
int now[50];
pair<int, int> d[100005], u[100005], l[100005], r[100005];
void work(int z1, int z2, int z3, int z4) {
  int ct = 0;
  for (int i = n; i >= n - z1 + 1; i--) now[++ct] = u[i].second;
  for (int i = 1; i <= z2; i++) now[++ct] = d[i].second;
  for (int i = 1; i <= z3; i++) now[++ct] = l[i].second;
  for (int i = n; i >= n - z4 + 1; i--) now[++ct] = r[i].second;
  sort(now + 1, now + ct + 1);
  int cnt = unique(now + 1, now + ct + 1) - now - 1;
  if (cnt > K) return;
  int U = u[n - z1].first;
  int D = d[z2 + 1].first;
  int L = l[z3 + 1].first;
  int R = r[n - z4].first;
  int d1 = max((U - D + 1) / 2, 1);
  int d2 = max((R - L + 1) / 2, 1);
  long long q = 1ll * d1 * d2;
  if (ans == -1 || ans > q) ans = q;
}
int main() {
  scanf("%d %d", &n, &K);
  for (int i = 1; i <= n; i++) {
    int x1, x2, y1, y2;
    scanf("%d %d %d %d", &x1, &y1, &x2, &y2);
    u[i] = d[i] = make_pair(x1 + x2, i);
    l[i] = r[i] = make_pair(y1 + y2, i);
  }
  sort(u, u + n + 1);
  sort(d, d + n + 1);
  sort(l, l + n + 1);
  sort(r, r + n + 1);
  for (int i = 0; i <= K; i++) {
    for (int j = 0; j <= K; j++) {
      for (int k = 0; k <= K; k++) {
        for (int q = 0; q <= K; q++) {
          work(i, j, k, q);
        }
      }
    }
  }
  cout << ans << endl;
  return 0;
}
