#include <bits/stdc++.h>
using namespace std;
struct str {
  int x;
  int y;
  int id;
  str(int xx = 0, int yy = 0, int idd = 0) : x(xx), y(yy), id(idd) {}
};
bool cmp1(str &a, str &b) { return (a.x != b.x ? a.x < b.x : a.y < b.y); }
bool cmp2(str &a, str &b) { return (a.y != b.y ? a.y < b.y : a.x < b.x); }
int main(int argc, const char *argv[]) {
  std::ios::sync_with_stdio(false);
  int n, k;
  cin >> n >> k;
  vector<str> c(n);
  int x1, y1, x2, y2;
  for (int i = 0; i < n; ++i) {
    cin >> x1 >> y1 >> x2 >> y2;
    c[i] = str(x1 + x2, y1 + y2, i);
  }
  vector<str> cx(c.begin(), c.end());
  vector<str> cy(c.begin(), c.end());
  sort(cx.begin(), cx.end(), cmp1);
  sort(cy.begin(), cy.end(), cmp2);
  long long res = 1000000000;
  res = res * res;
  for (int i = 0; i <= k; ++i) {
    for (int j = 0; j <= k; ++j) {
      for (int ii = 0; ii <= i; ++ii) {
        for (int jj = 0; jj <= j; ++jj) {
          set<int> deleted;
          int lx = n - 1, ly = n - 1;
          int fx = 0, fy = 0;
          for (int kk = 0; kk < ii; ++kk) {
            deleted.insert(cx[kk].id);
            fx = kk + 1;
          }
          for (int kk = 0; kk + ii < i; ++kk) {
            deleted.insert(cx[n - 1 - kk].id);
            lx = n - 1 - kk - 1;
          }
          for (int kk = 0; kk < jj; ++kk) {
            deleted.insert(cy[kk].id);
            fy = kk + 1;
          }
          for (int kk = 0; kk + jj < j; ++kk) {
            deleted.insert(cy[n - 1 - kk].id);
            ly = n - 1 - kk - 1;
          }
          if (deleted.size() <= k) {
            long long xx = cx[lx].x - cx[fx].x;
            long long yy = cy[ly].y - cy[fy].y;
            yy = yy / 2 + yy % 2;
            if (xx == 0) {
              xx = 1;
            }
            xx = xx / 2 + xx % 2;
            if (yy == 0) {
              yy = 1;
            }
            res = min(res, xx * yy);
          }
        }
      }
    }
  }
  cout << res;
  return 0;
}
