#include <bits/stdc++.h>
using namespace std;
int n, k;
multiset<pair<long long, long long>> X, Y;
long long answer;
void pop(pair<long long, long long> v) {
  X.erase(X.find(v));
  Y.erase(Y.find(make_pair(v.second, v.first)));
}
void put(pair<long long, long long> v) {
  X.insert(v);
  Y.insert(make_pair(v.second, v.first));
}
void go(int step) {
  if (step == k) {
    long long xmin = X.begin()->first;
    long long xmax = X.rbegin()->first;
    long long ymin = Y.begin()->first;
    long long ymax = Y.rbegin()->first;
    if ((xmax - xmin) & 1) xmax++;
    if ((ymax - ymin) & 1) ymax++;
    answer =
        min(answer, max(1ll, (xmax - xmin) / 2) * max(1ll, (ymax - ymin) / 2));
    return;
  }
  pair<long long, long long> save;
  save = *X.begin();
  pop(save);
  go(step + 1);
  put(save);
  save = make_pair(X.rbegin()->first, X.rbegin()->second);
  pop(save);
  go(step + 1);
  put(save);
  save = make_pair(Y.begin()->second, Y.begin()->first);
  pop(save);
  go(step + 1);
  put(save);
  save = make_pair(Y.rbegin()->second, Y.rbegin()->first);
  pop(save);
  go(step + 1);
  put(save);
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    long long x1, y1, x2, y2;
    cin >> x1 >> y1 >> x2 >> y2;
    put(make_pair(x1 + x2, y1 + y2));
  }
  answer = 9e18;
  go(0);
  cout << answer;
  return 0;
}
