#include <bits/stdc++.h>
using namespace std;
int const N = 1e5 + 20;
long long n, k, x, y, x2, y2;
pair<long long, long long> l[N], r[N], high[N], low[N];
bool mark[N];
long long solve(long long _k, long long p1, long long p2, long long p3,
                long long p4) {
  long long res = 0;
  while (mark[l[p1].second] && p1 < n) p1++;
  while (mark[r[p2].second] && p2 < n) p2++;
  while (mark[high[p3].second] && p3 < n) p3++;
  while (mark[low[p4].second] && p4 < n) p4++;
  res = max(r[p2].first - l[p1].first, 2LL) *
        max(high[p3].first - low[p4].first, 2LL) / 4;
  if (_k != k) {
    mark[l[p1].second] = 1;
    res = min(res, solve(_k + 1, p1, p2, p3, p4));
    mark[l[p1].second] = 0;
    mark[r[p2].second] = 1;
    res = min(res, solve(_k + 1, p1, p2, p3, p4));
    mark[r[p2].second] = 0;
    mark[high[p3].second] = 1;
    res = min(res, solve(_k + 1, p1, p2, p3, p4));
    mark[high[p3].second] = 0;
    mark[low[p4].second] = 1;
    res = min(res, solve(_k + 1, p1, p2, p3, p4));
    mark[low[p4].second] = 0;
  }
  return res;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> k;
  for (long long i = 0; i < n; i++) {
    cin >> x >> y >> x2 >> y2;
    l[i].second = r[i].second = high[i].second = low[i].second = i;
    l[i].first = r[i].first = (x + x2);
    low[i].first = high[i].first = (y + y2);
  }
  sort(l, l + n);
  sort(low, low + n);
  sort(r, r + n, greater<pair<long long, long long> >());
  sort(high, high + n, greater<pair<long long, long long> >());
  return cout << solve(0, 0, 0, 0, 0), 0;
}
