#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9 + 333;
const long long linf = 1e18 + inf;
const int N = 1e5 + 5;
int n, k;
pair<int, int> a[N];
vector<int> v;
long long f(int k) {
  int ans = inf * 2;
  for (int l = 0; l <= k; l++) {
    int r = k - l;
    ans = min(ans, max(1, (v[v.size() - 1 - r] - v[l] + 1) / 2));
  }
  return ans;
}
int main() {
  scanf("%d %d", &n, &k);
  for (int i = 1; i <= n; i++) {
    int x1, y1, x2, y2;
    scanf("%d %d %d %d", &x1, &y1, &x2, &y2);
    a[i] = pair<int, int>(x1 + x2, y1 + y2);
  }
  sort(a + 1, a + n + 1);
  long long ans = linf;
  for (int l = 0; l <= k; l++) {
    v.clear();
    for (int i = l + 1; i + (k - l) <= n; i++) v.push_back(a[i].second);
    sort(v.begin(), v.end());
    int last = n - (k - l);
    for (int r = k - l; r >= 0; r--) {
      ans = min(
          ans, f(k - l - r) * max(1, (a[last].first - a[l + 1].first + 1) / 2));
      last++;
      v.insert(lower_bound(v.begin(), v.end(), a[last].second), a[last].second);
    }
  }
  printf("%lld\n", ans);
  return 0;
}
