#include <bits/stdc++.h>
using namespace std;
struct node {
  int index;
  double x, y;
} cx[100000 + 100], cy[100000 + 100];
bool cmpx(node a, node b) { return a.x < b.x; }
bool cmpy(node a, node b) { return a.y < b.y; }
long long mins;
int vis[100000 + 100];
void dfs(int k, int lx, int rx, int ly, int ry) {
  while (vis[cx[lx].index]) lx++;
  while (vis[cx[rx].index]) rx--;
  while (vis[cy[ly].index]) ly++;
  while (vis[cy[ry].index]) ry--;
  if (k == 0) {
    long long s = max(1LL, (long long)(cx[rx].x - cx[lx].x)) *
                  max(1LL, (long long)(cy[ry].y - cy[ly].y));
    if (s < mins) mins = s;
    return;
  }
  vis[cx[lx].index] = 1;
  dfs(k - 1, lx + 1, rx, ly, ry);
  vis[cx[lx].index] = 0;
  vis[cx[rx].index] = 1;
  dfs(k - 1, lx, rx - 1, ly, ry);
  vis[cx[rx].index] = 0;
  vis[cy[ly].index] = 1;
  dfs(k - 1, lx, rx, ly + 1, ry);
  vis[cy[ly].index] = 0;
  vis[cy[ry].index] = 1;
  dfs(k - 1, lx, rx, ly, ry - 1);
  vis[cy[ry].index] = 0;
}
int main() {
  memset(vis, 0, sizeof(vis));
  int n, k;
  scanf("%d%d", &n, &k);
  for (int i = 0; i < n; i++) {
    int x1, y1, x2, y2;
    scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
    cx[i].index = i;
    cx[i].x = (x1 + x2) / 2.0;
    cx[i].y = (y1 + y2) / 2.0;
    cy[i].index = i;
    cy[i].x = cx[i].x;
    cy[i].y = cx[i].y;
  }
  sort(cx, cx + n, cmpx);
  sort(cy, cy + n, cmpy);
  mins = max(1LL, (long long)(cx[n - 1].x - cx[0].x)) *
         max(1LL, (long long)(cy[n - 1].y - cy[0].y));
  dfs(k, 0, n - 1, 0, n - 1);
  if (mins == 0)
    printf("1\n");
  else
    printf("%lld\n", mins);
  return 0;
}
