#include <bits/stdc++.h>
using namespace std;
struct pointx {
  long long x;
  long long tag;
  bool operator<(const pointx &a) const { return x < a.x; }
} px[100010];
struct pointy {
  long long y;
  long long tag;
  bool operator<(const pointy &a) const { return y < a.y; }
} py[100010];
int n, k;
bool vis[100010];
long long dfs(int minx, int maxx, int miny, int maxy, int cnt) {
  while (vis[px[minx].tag]) minx++;
  while (vis[px[maxx].tag]) maxx--;
  while (vis[py[miny].tag]) miny++;
  while (vis[py[maxy].tag]) maxy--;
  if (cnt == k) {
    long long dx = px[maxx].x - px[minx].x;
    long long dy = py[maxy].y - py[miny].y;
    dx = dx / 2 + dx % 2;
    dy = dy / 2 + dy % 2;
    dx = max(dx, (long long)1);
    dy = max(dy, (long long)1);
    return dx * dy;
  }
  long long ans = 1e18;
  vis[px[minx].tag] = 1;
  ans = min(ans, dfs(minx + 1, maxx, miny, maxy, cnt + 1));
  vis[px[minx].tag] = 0;
  vis[px[maxx].tag] = 1;
  ans = min(ans, dfs(minx, maxx - 1, miny, maxy, cnt + 1));
  vis[px[maxx].tag] = 0;
  vis[py[miny].tag] = 1;
  ans = min(ans, dfs(minx, maxx, miny + 1, maxy, cnt + 1));
  vis[py[miny].tag] = 0;
  vis[py[maxy].tag] = 1;
  ans = min(ans, dfs(minx, maxx, miny, maxy - 1, cnt + 1));
  vis[py[maxy].tag] = 0;
  return ans;
}
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; i++) {
    long long x1, y1, x2, y2;
    scanf("%I64d%I64d%I64d%I64d", &x1, &y1, &x2, &y2);
    px[i].x = x1 + x2;
    py[i].y = y1 + y2;
    px[i].tag = py[i].tag = i;
  }
  sort(px + 1, px + n + 1);
  sort(py + 1, py + n + 1);
  printf("%I64d\n", dfs(1, n, 1, n, 0));
  return 0;
}
