#include <bits/stdc++.h>
using namespace std;
const long long int infinito = 4000000000000000000LL;
long long int sol = infinito;
struct elem {
  int x, y, ind;
  elem() {}
  elem(int inx, int iny, int inind) {
    x = inx;
    y = iny;
    ind = inind;
  }
};
bool comparax(elem e1, elem e2) { return e1.x < e2.x; }
bool comparay(elem e1, elem e2) { return e1.y < e2.y; }
int n;
int nbaned = 0;
int ibaned[1000000];
int baned[1000000];
elem ordx[1000000];
elem ordy[1000000];
elem ordxinv[1000000];
elem ordyinv[1000000];
void escribe(elem v[1000000]) {
  for (int i = 0; i < n; i++) {
    elem e = v[i];
    cout << "(" << e.x << "," << e.y << "," << e.ind << ")";
  }
  cout << endl;
}
void banea(elem v[1000000], int le) {
  for (int i = 0; le; i++) {
    elem &e = v[i];
    if (not baned[e.ind]) {
      ibaned[nbaned++] = e.ind;
      baned[e.ind] = 1;
      le--;
    }
  }
}
void computa(int le, int ri, int top, int bot) {
  banea(ordx, le);
  banea(ordxinv, ri);
  banea(ordy, bot);
  banea(ordyinv, top);
  int maxx, maxy, minx, miny;
  maxx = maxy = 0;
  minx = miny = 2000000000;
  for (int i = 0; i < n; i++) {
    elem &e = ordx[i];
    if (not baned[e.ind]) {
      maxx = max(maxx, e.x);
      maxy = max(maxy, e.y);
      minx = min(minx, e.x);
      miny = min(miny, e.y);
    }
  }
  long long int xx = maxx - minx;
  long long int yy = maxy - miny;
  xx = max(1LL, xx / 2 + (xx & 1));
  yy = max(1LL, yy / 2 + (yy & 1));
  sol = min(sol, xx * yy);
  while (nbaned) {
    nbaned--;
    baned[ibaned[nbaned]] = 0;
  }
}
int main() {
  ios::sync_with_stdio(false);
  int tope;
  cin >> n >> tope;
  for (int i = 0; i < n; i++) {
    int x1, y1, x2, y2;
    cin >> x1 >> y1 >> x2 >> y2;
    ordx[i].x = x1 + x2;
    ordx[i].y = y1 + y2;
    ordx[i].ind = i;
    ordy[i] = ordx[i];
    ordxinv[i] = ordx[i];
    ordyinv[i] = ordx[i];
  }
  sort(ordx, ordx + n, comparax);
  sort(ordy, ordy + n, comparay);
  sort(ordxinv, ordxinv + n, comparax);
  sort(ordyinv, ordyinv + n, comparay);
  reverse(ordxinv, ordxinv + n);
  reverse(ordyinv, ordyinv + n);
  for (int i = 0; i <= tope; i++)
    for (int j = i; j <= tope; j++)
      for (int k = j; k <= tope; k++) computa(i, j - i, k - j, tope - k);
  cout << sol << endl;
}
