#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:256000000")
using namespace std;
struct T {
  int x, y, num;
  T(int x, int y, int num) : x(x), y(y), num(num) {}
  T() {}
};
int cmp_up(T a, T b) { return a.y > b.y; }
int cmp_down(T a, T b) { return a.y < b.y; }
int cmp_left(T a, T b) { return a.x < b.x; }
int cmp_right(T a, T b) { return a.x > b.x; }
int cmp(T a, T b) {
  return a.x > b.x || a.x == b.x && (a.y > b.y || a.y == b.y && a.num > b.num);
}
int cmp_unique(T a, T b) { return a.x == b.x && a.y == b.y && a.num == b.num; }
vector<T> a, b;
int main() {
  int n, k;
  scanf("%d %d", &n, &k);
  for (int i = 0; i < n; i++) {
    int xl, yl, xr, yr;
    scanf("%d %d %d %d", &xl, &yl, &xr, &yr);
    a.push_back(T(xl + xr, yl + yr, i));
  }
  sort(a.begin(), a.end(), cmp_up);
  for (int i = 0; i < k + 1; i++) b.push_back(a[i]);
  sort(a.begin(), a.end(), cmp_down);
  for (int i = 0; i < k + 1; i++) b.push_back(a[i]);
  sort(a.begin(), a.end(), cmp_left);
  for (int i = 0; i < k + 1; i++) b.push_back(a[i]);
  sort(a.begin(), a.end(), cmp_right);
  for (int i = 0; i < k + 1; i++) b.push_back(a[i]);
  sort(b.begin(), b.end(), cmp);
  b.resize(unique(b.begin(), b.end(), cmp_unique) - b.begin());
  vector<int> x, y;
  for (int i = 0; i < b.size(); i++) {
    x.push_back(b[i].x);
    y.push_back(b[i].y);
  }
  sort(x.begin(), x.end());
  sort(y.begin(), y.end());
  x.resize(unique(x.begin(), x.end()) - x.begin());
  y.resize(unique(y.begin(), y.end()) - y.begin());
  long long res = LLONG_MAX;
  for (int it_l = 0; it_l < x.size(); it_l++)
    for (int it_r = it_l; it_r < x.size(); it_r++)
      for (int it_d = 0; it_d < y.size(); it_d++)
        for (int it_u = it_d; it_u < y.size(); it_u++) {
          int l = x[it_l], r = x[it_r], u = y[it_u], d = y[it_d];
          long long cur_cnt =
              1LL * ((max(r - l, 1) + 1) / 2) * ((max(u - d, 1) + 1) / 2);
          if (cur_cnt >= res) continue;
          int cnt = 0;
          for (int i = 0; i < b.size(); i++) {
            if (b[i].x < l || b[i].x > r || b[i].y < d || b[i].y > u) cnt++;
          }
          if (cnt <= k) res = cur_cnt;
        }
  cout << res;
}
