#include <bits/stdc++.h>
using namespace std;
namespace mine {
long long qread() {
  long long ans = 0, f = 1;
  char c = getchar();
  while (c < '0' or c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while ('0' <= c and c <= '9') ans = ans * 10 + c - '0', c = getchar();
  return ans * f;
}
void write(long long num) {
  if (num < 0) putchar('-'), num = -num;
  if (num >= 10) write(num / 10);
  putchar('0' + num % 10);
}
void write1(long long num) {
  write(num);
  putchar(' ');
}
void write2(long long num) {
  write(num);
  putchar('\n');
}
template <typename T>
void chmax(T &x, const T y) {
  x = (x > y ? x : y);
}
template <typename T>
void chmin(T &x, const T y) {
  x = (x < y ? x : y);
}
long long gcd(long long x, long long y) { return y ? gcd(y, x % y) : x; }
const int INF = 0x3f3f3f3f;
const int MOD = 1e9 + 7;
int mm(const int x) { return x >= MOD ? x - MOD : x; }
template <typename T>
void add(T &x, const T &y) {
  x = (x + y >= MOD ? x + y - MOD : x + y);
}
long long qpower(long long x, long long e, int mod = MOD) {
  long long ans = 1;
  if (e < 0) {
    puts("error");
    exit(666);
  }
  while (e) {
    if (e & 1) ans = ans * x % mod;
    x = x * x % mod;
    e >>= 1;
  }
  return ans;
}
long long invm(long long x) { return qpower(x, MOD - 2); }
const int N = 1e6 + 10;
struct Pt {
  int x, y, id;
} a[N], b[N];
bool use[N];
bool cmp1(Pt x, Pt y) { return x.x < y.x; }
bool cmp2(Pt x, Pt y) { return x.y < y.y; }
long long ans = 1ll * INF * INF;
void upd(int x1, int x2, int y1, int y2) {
  chmin(ans, max((long long)ceil((x2 - x1) / 2.0), 1ll) *
                 max((long long)ceil((y2 - y1) / 2.0), 1ll));
}
void main() {
  int n = qread(), k = qread();
  for (int i = (1), I = (n); i <= I; i++) {
    int x1, y1, x2, y2;
    scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
    a[i] = b[i] = (Pt){x1 + x2, y1 + y2, i};
  }
  sort(a + 1, a + n + 1, cmp1);
  sort(b + 1, b + n + 1, cmp2);
  for (int p1 = (0), I = (k); p1 <= I; p1++)
    for (int p2 = (0), I = (k); p2 <= I; p2++)
      for (int p3 = (0), I = (k); p3 <= I; p3++) {
        int cnt = 0;
        for (int i = (1), I = (k); i <= I; i++)
          use[a[i].id] = use[a[n - i + 1].id] = use[b[i].id] =
              use[b[n - i + 1].id] = 0;
        for (int i = (1), I = (p1); i <= I; i++)
          cnt += use[a[i].id] ^ 1, use[a[i].id] = 1;
        for (int i = (1), I = (p2); i <= I; i++)
          cnt += use[a[n - i + 1].id] ^ 1, use[a[n - i + 1].id] = 1;
        for (int i = (1), I = (p3); i <= I; i++)
          cnt += use[b[i].id] ^ 1, use[b[i].id] = 1;
        int lx = p1 + 1, rx = n - p2, ly = p3 + 1, ry = n;
        for (int p4 = (0), I = (k); p4 <= I; p4++) {
          if (p4) cnt += use[b[n - p4 + 1].id] ^ 1, use[b[n - p4 + 1].id] = 1;
          if (cnt > k) continue;
          while (use[a[lx].id]) lx++;
          while (use[a[rx].id]) rx--;
          if (lx > rx) puts("");
          while (use[b[ly].id]) ly++;
          while (use[b[ry].id]) ry--;
          if (ly > ry) puts("");
          upd(a[lx].x, a[rx].x, b[ly].y, b[ry].y);
        }
      }
  printf("%lld", ans);
}
};  // namespace mine
signed main() {
  srand(time(0));
  mine::main();
}
