#include <bits/stdc++.h>
using namespace std;
struct Point {
  long long x, y;
  Point(long long x = 0, long long y = 0) : x(x), y(y) {}
};
const int MAXN = 1e5 + 20;
const long long INF = 1ll << 62;
int n, k, pos[4][MAXN];
Point p[MAXN];
long long ys[MAXN];
bool del[MAXN];
struct Cmp0 {
  bool operator()(int a, int b) const { return p[a].x < p[b].x; }
};
struct Cmp1 {
  bool operator()(int a, int b) const { return p[a].x > p[b].x; }
};
struct Cmp2 {
  bool operator()(int a, int b) const { return p[a].y < p[b].y; }
};
struct Cmp3 {
  bool operator()(int a, int b) const { return p[a].y > p[b].y; }
};
template <typename T>
void minimize(T& a, T b) {
  a = min(a, b);
}
template <typename T>
void maximize(T& a, T b) {
  a = max(a, b);
}
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 0; i < n; i++) {
    long long x1, y1, x2, y2;
    scanf("%lld%lld%lld%lld", &x1, &y1, &x2, &y2);
    p[i] = Point(x1 + x2, y1 + y2);
    for (int j = 0; j < 4; j++) pos[j][i] = i;
  }
  sort(pos[0], pos[0] + n, Cmp0());
  sort(pos[1], pos[1] + n, Cmp1());
  sort(pos[2], pos[2] + n, Cmp2());
  sort(pos[3], pos[3] + n, Cmp3());
  long long ans = INF;
  for (int ld = 0; ld <= k; ld++) {
    for (int rd = 0; rd <= k; rd++)
      for (int dd = 0; dd <= k; dd++)
        for (int ud = 0; ud <= k; ud++) {
          int cnt = 0;
          memset(del, 0, sizeof del);
          for (int i = 0; i < ld; i++)
            if (!del[pos[0][i]]) {
              del[pos[0][i]] = true;
              cnt++;
            }
          for (int i = 0; i < rd; i++)
            if (!del[pos[1][i]]) {
              del[pos[1][i]] = true;
              cnt++;
            }
          for (int i = 0; i < dd; i++)
            if (!del[pos[2][i]]) {
              del[pos[2][i]] = true;
              cnt++;
            }
          for (int i = 0; i < ud; i++)
            if (!del[pos[3][i]]) {
              del[pos[3][i]] = true;
              cnt++;
            }
          if (cnt != k) continue;
          long long miny = INF, maxy = -INF, minx = INF, maxx = -INF;
          for (int i = 0; i < n; i++)
            if (!del[i]) {
              minimize(miny, p[i].y);
              maximize(maxy, p[i].y);
              minimize(minx, p[i].x);
              maximize(maxx, p[i].x);
            }
          long long w = maxx - minx, h = maxy - miny;
          maximize(w, 2ll);
          maximize(h, 2ll);
          minimize(ans, w * h);
        }
  }
  printf("%lld\n", ans / 4);
}
