#include <bits/stdc++.h>
using namespace std;
void fre() {
  freopen("c://test//input.in", "r", stdin);
  freopen("c://test//output.out", "w", stdout);
}
template <class T1, class T2>
inline void gmax(T1 &a, T2 b) {
  if (b > a) a = b;
}
template <class T1, class T2>
inline void gmin(T1 &a, T2 b) {
  if (b < a) a = b;
}
const int N = 1e5 + 10, M = 0, Z = 1e9 + 7, ms63 = 1061109567;
int n, m;
struct A {
  int v;
  int p;
  bool operator<(const A &b) const {
    if (v != b.v)
      return v < b.v;
    else
      return p < b.p;
  }
} x[N], y[N];
int e[N];
int main() {
  int x1, y1, x2, y2;
  while (~scanf("%d%d", &n, &m)) {
    for (int i = 1; i <= n; ++i) {
      scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
      x[i].v = (x2 + x1);
      x[i].p = i;
      y[i].v = (y1 + y2);
      y[i].p = i;
    }
    sort(x + 1, x + n + 1);
    sort(y + 1, y + n + 1);
    memset(e, 0, sizeof(e));
    long long ans = 4e18;
    int num = 0;
    for (int top = 1; top <= 1 + m; ++top) {
      for (int bot = n; bot >= n - m; --bot) {
        for (int lft = 1; lft <= 1 + m; ++lft) {
          for (int rgt = n; rgt >= n - m; --rgt) {
            if (num <= m) {
              long long a = max((y[bot].v - y[top].v), 2);
              if (a & 1) ++a;
              long long b = max((x[rgt].v - x[lft].v), 2);
              if (b & 1) ++b;
              gmin(ans, a * b);
            }
            if (++e[x[rgt].p] == 1) ++num;
          }
          for (int rgt = n; rgt >= n - m; --rgt)
            if (--e[x[rgt].p] == 0) --num;
          if (++e[x[lft].p] == 1) ++num;
        }
        for (int lft = 1; lft <= 1 + m; ++lft)
          if (--e[x[lft].p] == 0) --num;
        if (++e[y[bot].p] == 1) ++num;
      }
      for (int bot = n; bot >= n - m; --bot)
        if (--e[y[bot].p] == 0) --num;
      if (++e[y[top].p] == 1) ++num;
    }
    for (int top = 1; top <= 1 + m; ++top)
      if (--e[y[top].p] == 0) --num;
    printf("%lld\n", ans / 4);
  }
  return 0;
}
