#include <bits/stdc++.h>
using namespace std;
char _;
const long long maxN = 200 * 1000 + 5;
const long long mod = 1000 * 1000 * 1000 + 7;
const long long base = 701;
const long long SQ = 317;
const long long maxL = 302;
pair<pair<long long, long long>, long long> a[maxN], b[maxN];
bool mark[maxN];
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long n, k;
  cin >> n >> k;
  for (long long i = 0; i < n; i++) {
    long long x1, x2, y1, y2;
    cin >> x1 >> y1 >> x2 >> y2;
    a[i].first.first = x1 + x2;
    a[i].first.second = y1 + y2;
    a[i].second = i;
    b[i] = a[i];
    swap(b[i].first.first, b[i].first.second);
  }
  sort(a, a + n);
  sort(b, b + n);
  long long ans = 4LL * mod * mod;
  for (long long i = 0; i < k + 1; i++)
    for (long long j = 0; j < k + 1 - i; j++)
      for (long long ii = 0; ii < k + 1 - i - j; ii++)
        for (long long jj = 0; jj < k + 1 - i - j - ii; jj++) {
          vector<long long> bb;
          for (long long z = 0, cnt = 0; cnt < i; z++)
            if (mark[a[z].second] == 0) {
              mark[a[z].second] = 1;
              cnt++;
              bb.push_back(a[z].second);
            }
          for (long long z = n - 1, cnt = 0; cnt < j; z--)
            if (mark[a[z].second] == 0) {
              mark[a[z].second] = 1;
              cnt++;
              bb.push_back(a[z].second);
            }
          for (long long z = 0, cnt = 0; cnt < ii; z++)
            if (mark[b[z].second] == 0) {
              mark[b[z].second] = 1;
              cnt++;
              bb.push_back(b[z].second);
            }
          for (long long z = n - 1, cnt = 0; cnt < jj; z--)
            if (mark[b[z].second] == 0) {
              mark[b[z].second] = 1;
              cnt++;
              bb.push_back(b[z].second);
            }
          long long mnx = 2 * mod, mny = 2 * mod, mxx = 0, mxy = 0;
          for (long long z = 0; z < k + 1; z++)
            if (mark[a[z].second] == 0) {
              mnx = a[z].first.first;
              break;
            }
          for (long long z = 0; z < k + 1; z++)
            if (mark[b[z].second] == 0) {
              mny = b[z].first.first;
              break;
            }
          for (long long z = n - 1; z >= n - k - 1; z--)
            if (mark[a[z].second] == 0) {
              mxx = a[z].first.first;
              break;
            }
          for (long long z = n - 1; z >= n - k - 1; z--)
            if (mark[b[z].second] == 0) {
              mxy = b[z].first.first;
              break;
            }
          long long x = mxx - mnx, y = mxy - mny;
          x = max(x, 1LL);
          y = max(y, 1LL);
          if (x % 2) x++;
          if (y % 2) y++;
          long long area = x * y;
          ans = min(ans, area);
          for (long long z = 0; z < (long long)bb.size(); z++) mark[bb[z]] = 0;
        }
  cout << ans / 4 << endl;
  return 0;
}
