#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
struct SegmentTree {
  int Max[N << 2], Min[N << 2];
  void pushup(int rt) {
    Max[rt] = max(Max[rt << 1], Max[rt << 1 | 1]);
    Min[rt] = min(Min[rt << 1], Min[rt << 1 | 1]);
  }
  void build(int l, int r, int rt, int v[]) {
    if (l == r) {
      Min[rt] = Max[rt] = v[l];
      return;
    }
    int mid = (l + r) >> 1;
    build(l, mid, rt << 1, v);
    build(mid + 1, r, rt << 1 | 1, v);
    pushup(rt);
  }
  void update(int loc, int v, int l, int r, int rt) {
    if (l == r) {
      if (v != -1)
        Max[rt] = Min[rt] = v;
      else
        Max[rt] = -1, Min[rt] = 2e9 + 7;
      return;
    }
    int mid = (l + r) >> 1;
    if (loc <= mid)
      update(loc, v, l, mid, rt << 1);
    else
      update(loc, v, mid + 1, r, rt << 1 | 1);
    pushup(rt);
  }
  int query() { return max((Max[1] - Min[1] + 1) / 2, 1); }
} sgtx, sgty;
struct Node {
  int x, y, id;
  Node() {}
  Node(int x, int y, int id) : x(x), y(y), id(id) {}
} nd[N];
int X[N], Y[N];
int cmp1(const Node &a, const Node &b) {
  if (a.x != b.x) return a.x < b.x;
  return a.y > b.y;
}
int cmp2(const Node &a, const Node &b) {
  if (a.x != b.x) return a.x < b.x;
  return a.y < b.y;
}
int cmp3(const Node &a, const Node &b) {
  if (a.y != b.y) return a.y < b.y;
  return a.x < b.x;
}
int cmp4(const Node &a, const Node &b) {
  if (a.y != b.y) return a.y < b.y;
  return a.x > b.x;
}
int del[10][20], k, n, lk;
int tmp[10][20];
bool vis[N];
long long ans = 1e18;
int dele(int id, int x) {
  int t = 0, tid;
  for (int i = 0; i < lk && t < x; i++) {
    tid = del[id][i];
    if (vis[tid]) continue;
    sgtx.update(tid, -1, 1, n, 1);
    sgty.update(tid, -1, 1, n, 1);
    vis[tid] = 1;
    tmp[id][t] = tid;
    t++;
  }
  return t;
}
void recover(int id, int x) {
  for (int i = 0; i < x; i++) {
    int t = tmp[id][i];
    sgtx.update(t, X[t], 1, n, 1);
    sgty.update(t, Y[t], 1, n, 1);
    vis[t] = 0;
  }
}
void dfs(int res, int dep) {
  if (dep == 7 || res == 0) {
    int cc = dele(dep, res);
    ans = min(ans, 1ll * sgtx.query() * sgty.query());
    recover(dep, cc);
    return;
  }
  for (int c = 0; c <= res; c++) {
    int cc = dele(dep, c);
    dfs(res - cc, dep + 1);
    while (cc != c)
      ;
    recover(dep, cc);
  }
}
int main() {
  memset(vis, 0, sizeof(vis));
  int x1, y1, x2, y2;
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; i++) {
    scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
    X[i] = x1 + x2;
    Y[i] = y1 + y2;
    nd[i] = Node(X[i], Y[i], i);
  }
  sgtx.build(1, n, 1, X);
  sgty.build(1, n, 1, Y);
  lk = min(k * 2, n);
  sort(nd + 1, nd + n + 1, cmp1);
  for (int i = 1; i <= lk; i++) del[0][i - 1] = nd[i].id;
  for (int i = 1; i <= lk; i++) del[1][i - 1] = nd[n - i + 1].id;
  sort(nd + 1, nd + n + 1, cmp2);
  for (int i = 1; i <= lk; i++) del[2][i - 1] = nd[i].id;
  for (int i = 1; i <= lk; i++) del[3][i - 1] = nd[n - i + 1].id;
  sort(nd + 1, nd + n + 1, cmp3);
  for (int i = 1; i <= lk; i++) del[4][i - 1] = nd[i].id;
  for (int i = 1; i <= lk; i++) del[5][i - 1] = nd[n - i + 1].id;
  sort(nd + 1, nd + n + 1, cmp4);
  for (int i = 1; i <= lk; i++) del[6][i - 1] = nd[i].id;
  for (int i = 1; i <= lk; i++) del[7][i - 1] = nd[n - i + 1].id;
  dfs(k, 0);
  printf("%I64d\n", ans);
  return 0;
}
