#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  char ch = getchar();
  long long x = 0, f = 1;
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
long long n, k, flag, cnt, ans = (1ll << 62), a[100005], b[100005], c[100005],
                           d[100005], vis[100005];
struct data {
  long long x, y;
} f[100005];
bool cmp1(long long x, long long y) { return f[x].x < f[y].x; }
bool cmp2(long long x, long long y) { return f[x].x > f[y].x; }
bool cmp3(long long x, long long y) { return f[x].y < f[y].y; }
bool cmp4(long long x, long long y) { return f[x].y > f[y].y; }
int main() {
  n = read();
  k = read();
  for (long long i = 1; i <= n; ++i) {
    long long x1 = read(), y1 = read(), x2 = read(), y2 = read();
    f[i].x = x1 + x2;
    f[i].y = y1 + y2;
    a[i] = b[i] = c[i] = d[i] = i;
  }
  sort(a + 1, a + 1 + n, cmp1);
  sort(b + 1, b + 1 + n, cmp2);
  sort(c + 1, c + 1 + n, cmp3);
  sort(d + 1, d + 1 + n, cmp4);
  for (long long l = 0; l <= k; ++l)
    for (long long r = 0; r <= k; ++r)
      for (long long s = 0; s <= k; ++s)
        for (long long x = 0; x <= k; ++x) {
          ++flag;
          cnt = 0;
          for (long long i = 1; i <= l; ++i)
            if (vis[a[i]] != flag) {
              vis[a[i]] = flag;
              ++cnt;
            }
          for (long long i = 1; i <= r; ++i)
            if (vis[b[i]] != flag) {
              vis[b[i]] = flag;
              ++cnt;
            }
          for (long long i = 1; i <= s; ++i)
            if (vis[c[i]] != flag) {
              vis[c[i]] = flag;
              ++cnt;
            }
          for (long long i = 1; i <= x; ++i)
            if (vis[d[i]] != flag) {
              vis[d[i]] = flag;
              ++cnt;
            }
          if (cnt != k) continue;
          long long maxx = -(1ll << 62), minx = (1ll << 62),
                    maxy = -(1ll << 62), miny = (1ll << 62);
          for (long long i = 1; i <= n; ++i) {
            if (vis[i] == flag) continue;
            maxx = max(f[i].x, maxx);
            minx = min(f[i].x, minx);
            maxy = max(f[i].y, maxy);
            miny = min(f[i].y, miny);
          }
          long long xx = maxx - minx, yy = maxy - miny;
          xx = max(xx, 2ll);
          yy = max(yy, 2ll);
          if (xx & 1) ++xx;
          if (yy & 1) ++yy;
          ans = min(ans, xx * yy);
        }
  printf("%lld", ans / 4);
}
