#include <bits/stdc++.h>
using namespace std;
using pll = pair<long long, long long>;
int N, K;
pll A[100010];
int main() {
  if (fopen("input.txt", "r")) {
    freopen("input.txt", "r", stdin);
  }
  ios::sync_with_stdio(false);
  cin >> N >> K;
  for (int i = 0; i < N; i++) {
    long long x1, y1, x2, y2;
    cin >> x1 >> y1 >> x2 >> y2;
    A[i] = pll(x1 + x2, y1 + y2);
  }
  sort(A, A + N);
  long long ans = LLONG_MAX;
  for (int i = 0; i <= K; i++) {
    vector<long long> vals;
    for (int j = i; j < N; j++) {
      vals.push_back(A[j].second);
    }
    sort((vals).begin(), (vals).end());
    for (int j = 0; i + j <= K; j++) {
      long long diffx = A[N - 1 - j].first - A[i].first;
      int ndel = K - i - j;
      int diff = int(vals.size()) - ndel - 1;
      long long diffy = LLONG_MAX;
      for (int k = 0; k <= ndel; k++) {
        diffy = min(diffy, vals[k + diff] - vals[k]);
      }
      ans = min(ans, max((diffx + 1) / 2, 1ll) * max((diffy + 1) / 2, 1ll));
      vals.erase(find((vals).begin(), (vals).end(), A[N - 1 - j].second));
    }
  }
  cout << ans << endl;
}
