#include <bits/stdc++.h>
using namespace std;
template <class T>
using vv = vector<vector<T>>;
template <class T>
ostream &operator<<(ostream &os, const vector<T> &t) {
  os << "{";
  for (int(i) = 0; (i) < (t.size()); ++(i)) {
    os << t[i] << ",";
  }
  os << "}" << endl;
  return os;
}
template <class S, class T>
ostream &operator<<(ostream &os, const pair<S, T> &t) {
  return os << "(" << t.first << "," << t.second << ")";
}
const long long MOD = 1e9 + 7;
int memo[112345];
int main() {
  cout << fixed << setprecision(0);
  int n, tt;
  scanf("%d%d", &n, &tt);
  vector<pair<long long, int>> vs[4];
  for (int(i) = 0; (i) < (n); ++(i)) {
    long long x, y, first, second;
    scanf("%I64d%I64d%I64d%I64d", &x, &y, &first, &second);
    vs[0].emplace_back(first + x, i);
    vs[2].emplace_back(second + y, i);
  }
  vs[1] = vs[0];
  vs[3] = vs[2];
  sort((vs[0]).begin(), (vs[0]).end());
  sort((vs[1]).rbegin(), (vs[1]).rend());
  sort((vs[2]).begin(), (vs[2]).end());
  sort((vs[3]).rbegin(), (vs[3]).rend());
  long long re = 1ll * max(2ll, vs[1][0].first - vs[0][0].first + 1) / 2 *
                 (max(2ll, vs[3][0].first - vs[2][0].first + 1) / 2);
  for (int(t) = 0; (t) < (tt + 1); ++(t)) {
    fill(memo, memo + 112345, -1);
    for (int(i) = 0; (i) < (1 << (t * 2)); ++(i)) {
      int ind[4] = {};
      for (int(j) = 0; (j) < (t); ++(j)) {
        int k = i >> (2 * j) & 3;
        while (memo[vs[k][ind[k]].second] == i) ++ind[k];
        memo[vs[k][ind[k]++].second] = i;
      }
      for (int(k) = 0; (k) < (4); ++(k))
        while (memo[vs[k][ind[k]].second] == i) ++ind[k];
      re = min(
          re,
          1ll * max(2ll, vs[1][ind[1]].first - vs[0][ind[0]].first + 1) / 2 *
              (max(2ll, vs[3][ind[3]].first - vs[2][ind[2]].first + 1) / 2));
    }
  }
  printf("%I64d\n", re);
  return 0;
}
