#include <bits/stdc++.h>
using namespace std;
long long n, k;
multiset<pair<long long, long long> > xy, yx;
pair<long long, long long> rev(pair<long long, long long> p) {
  return pair<long long, long long>(p.second, p.first);
}
long long rec(int lft) {
  if (lft == 0) {
    return max(((*xy.rbegin()).first - (*xy.begin()).first + 1) / 2,
               (long long)1) *
           max(((*yx.rbegin()).first - (*yx.begin()).first + 1) / 2,
               (long long)1);
  }
  long long ans = (long long)(1000000000) * 1000000000;
  pair<long long, long long> opt[4] = {(*xy.begin()), (*xy.rbegin()),
                                       rev((*yx.rbegin())), rev((*yx.begin()))};
  for (int i = 0; i < 4; i++) {
    xy.erase(xy.find(opt[i]));
    yx.erase(yx.find(rev(opt[i])));
    ans = min(ans, rec(lft - 1));
    xy.insert(opt[i]);
    yx.insert(rev(opt[i]));
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    long long a, b, c, d;
    cin >> a >> b >> c >> d;
    xy.insert(pair<long long, long long>(a + c, b + d));
    yx.insert(pair<long long, long long>(b + d, a + c));
  }
  cout << rec(k);
}
