#include <bits/stdc++.h>
using namespace std;
const int N = 100100;
int n, m;
struct point {
  long long x, y;
  int id;
};
point a[N], b[N];
int cmp1(point a, point b) { return a.x < b.x || (a.x == b.x && a.y < b.y); }
int cmp2(point a, point b) { return a.y < b.y || (a.y == b.y && a.x < b.x); }
int mark[N];
long long ans = 1e18;
void calc(int xl, int xr, int yl, int yr) {
  while (mark[a[xl].id]) xl++;
  while (mark[a[xr].id]) xr--;
  long long x1, x2, y1, y2;
  x1 = a[xl].x;
  x2 = a[xr].x;
  y1 = b[yl].y;
  y2 = b[yr].y;
  long long x, y;
  x = (x2 - x1 + 1) / 2;
  y = (y2 - y1 + 1) / 2;
  x = x ? x : 1;
  y = y ? y : 1;
  long long tmp = x * y;
  if (tmp < ans) ans = tmp;
}
void dfsy(int m, int xl, int xr) {
  int l, r, i, j;
  l = r = 0;
  for (i = -1; i < n; i++) {
    if (l > m) break;
    if (i >= 0) l += 0 == mark[b[i].id]++;
    if (l > m) break;
    r = 0;
    for (j = n; j >= 0; j--)
      if (l + r > m)
        break;
      else {
        if (j < n) r += 0 == mark[b[j].id]++;
        if (l + r > m) break;
        calc(xl, xr, i + 1, j - 1);
      }
    for (j; j < n; j++) mark[b[j].id]--;
  }
  for (i; i >= 0; i--) mark[b[i].id]--;
}
void dfsx() {
  for (int i = -1; i < n; i++) {
    if (i > m) break;
    if (i >= 0) mark[a[i].id]++;
    for (int j = n; j >= 0; j--)
      if (i + 1 + n - j > m)
        break;
      else {
        if (j < n) mark[a[j].id]++;
        dfsy(m - i - 1 - (n - j), i + 1, j - 1);
      }
    for (int j = n - 1; j >= 0; j--)
      if (i + 1 + n - j > m)
        break;
      else
        mark[a[j].id]--;
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    long long x1, y1, x2, y2;
    cin >> x1 >> y1 >> x2 >> y2;
    a[i] = b[i] = (point){x1 + x2, y1 + y2, i};
  }
  sort(a, a + n, cmp1);
  sort(b, b + n, cmp2);
  memset(mark, 0, sizeof(mark));
  dfsx();
  cout << ans;
  return 0;
}
