#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 1;
int n, k, u[N];
long long ans = 2e18;
pair<pair<double, double>, int> p[N], v[N];
bool cmp(pair<pair<double, double>, int> a, pair<pair<double, double>, int> b) {
  if (abs(a.first.first - b.first.first) < 1e-7) {
    return (a.first.second - b.first.second) < 1e-7;
  }
  return (a.first.first - b.first.first) < 1e-7;
}
int main() {
  scanf("%d %d", &n, &k);
  for (int i = 1; i <= n; i++) {
    int a, b, c, d;
    scanf("%d %d %d %d", &a, &b, &c, &d);
    p[i].first.first = (a + c) / 2.0;
    p[i].first.second = (b + d) / 2.0;
    p[i].second = i;
    v[i] = p[i];
    swap(v[i].first.first, v[i].first.second);
  }
  sort(p + 1, p + n + 1, cmp);
  sort(v + 1, v + n + 1, cmp);
  for (int a = 0; a <= k; a++)
    for (int b = 0; b <= k - a; b++)
      for (int c = 0; c <= k - a - b; c++)
        for (int d = 0; d <= k - a - b - c; d++) {
          int cnt = a, l = 1, r = n, L = 1, R = n;
          while (cnt) {
            cnt--;
            u[p[l].second] = 1;
            l++;
          }
          cnt = b;
          while (cnt) {
            cnt--;
            u[p[r].second] = 1;
            r--;
          }
          cnt = c;
          while (cnt) {
            if (u[v[L].second]) {
              L++;
              continue;
            }
            u[v[L].second] = 1;
            L++;
            cnt--;
          }
          cnt = d;
          while (cnt) {
            if (u[v[R].second]) {
              R--;
              continue;
            }
            u[v[R].second] = 1;
            R--;
            cnt--;
          }
          while (u[p[l].second]) l++;
          while (u[p[r].second]) r--;
          long long w = ceil(p[r].first.first - p[l].first.first), ra;
          ra = ceil(v[R].first.first - v[L].first.first);
          ans = min(max(w, 1ll) * max(ra, 1ll), ans);
          while (l > 0) u[p[l--].second] = 0;
          while (L > 0) u[v[L--].second] = 0;
          while (r <= n) u[p[r++].second] = 0;
          while (R <= n) u[v[R++].second] = 0;
        }
  cout << ans << endl;
}
