#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
const long long INF = 5e18;
pair<int, int> p[N];
vector<int> vx;
int n, k;
bool mark[N];
inline long long get(long long x) {
  if (x == 0) return 2;
  if (x % 2 == 0) return x;
  return x + 1;
}
long long check(int L, int R) {
  int cnt = 0;
  memset(mark, 0, sizeof mark);
  for (int i = 0; i < n; i++) {
    if (p[i].second > R || p[i].second < L) cnt++, mark[i] = true;
  }
  if (cnt > k) return -1;
  int m = n - k;
  int ted = 0, id = -1;
  for (int i = 0; i < n; i++) {
    if (mark[i]) continue;
    ted++;
    if (ted == m) id = i;
  }
  long long res = INF;
  for (int i = 0; i < n; i++) {
    if (mark[i]) continue;
    if (id == n) continue;
    res = min(res, get(p[id].first - p[i].first));
    id++;
    while (id < n && mark[id]) id++;
  }
  return res;
}
int main() {
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    int x0, y0, x1, y1;
    cin >> x0 >> y0 >> x1 >> y1;
    p[i] = {y0 + y1, x0 + x1};
    vx.push_back(x0 + x1);
  }
  sort(p, p + n);
  sort(vx.begin(), vx.end());
  vx.resize(unique(vx.begin(), vx.end()) - vx.begin());
  int sz = vx.size();
  long long ans = 5e18;
  for (int i = 0; i <= k; i++) {
    for (int j = max(i, sz - k - 1); j < sz; j++) {
      long long res = check(vx[i], vx[j]);
      if (res != -1)
        ans = min(ans, 1LL * get(vx[j] - vx[i]) * check(vx[i], vx[j]));
    }
  }
  cout << ans / 4 << endl;
}
